<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic C:\Projects&amp;gt;ifort /c /stand t in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Data-statement-not-working/m-p/1047651#M114509</link>
    <description>&lt;PRE class="brush:plain;"&gt;C:\Projects&amp;gt;ifort /c /stand t.f90
Intel(R) Visual Fortran Compiler XE for applications running on IA-32, Version 14.0.2.176 Build 20140130
Copyright (C) 1985-2014 Intel Corporation.  All rights reserved.

t.f90(1): warning #5436: Overlapping storage initializations encountered with ROWT
character(20) :: rowt(6,12) = ' '
-----------------^&lt;/PRE&gt;

&lt;P&gt;The compiler allows you to have overlapping initializations as an extension and, as Lorri says, it warns you if you ask for standards warnings. It does know what to do with it but that may not be what you want.&lt;/P&gt;</description>
    <pubDate>Tue, 24 Jun 2014 18:23:38 GMT</pubDate>
    <dc:creator>Steven_L_Intel1</dc:creator>
    <dc:date>2014-06-24T18:23:38Z</dc:date>
    <item>
      <title>Data statement not working?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Data-statement-not-working/m-p/1047640#M114498</link>
      <description>&lt;P&gt;I think I am going crazy, what's wrong with this?&lt;/P&gt;

&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; character(20) :: rowt(6,12) = ' '&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; data rowt(1,1:4) / ' ','zfactg','rhog','viscg'&amp;nbsp;&lt;/P&gt;

&lt;P&gt;When I run, I get this in the debugger:&lt;/P&gt;

&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; -&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;rowt(1,1:4)&amp;nbsp;&amp;nbsp; &amp;nbsp;{...}&amp;nbsp;&amp;nbsp; &amp;nbsp;CHARACTER(20)&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;rowt(1,1)&amp;nbsp;&amp;nbsp; &amp;nbsp;' &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'&amp;nbsp;&amp;nbsp; &amp;nbsp;CHARACTER(20)&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;rowt(1,2)&amp;nbsp;&amp;nbsp; &amp;nbsp;' &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'&amp;nbsp;&amp;nbsp; &amp;nbsp;CHARACTER(20)&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;rowt(1,3)&amp;nbsp;&amp;nbsp; &amp;nbsp;' &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'&amp;nbsp;&amp;nbsp; &amp;nbsp;CHARACTER(20)&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;rowt(1,4)&amp;nbsp;&amp;nbsp; &amp;nbsp;' &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'&amp;nbsp;&amp;nbsp; &amp;nbsp;CHARACTER(20)&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jun 2014 14:33:52 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Data-statement-not-working/m-p/1047640#M114498</guid>
      <dc:creator>Adrian_F_1</dc:creator>
      <dc:date>2014-06-23T14:33:52Z</dc:date>
    </item>
    <item>
      <title>You have initialized the</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Data-statement-not-working/m-p/1047641#M114499</link>
      <description>&lt;P&gt;You have initialized the array more than once: first in the declaration with an initialization clause, and again in the DATA statement.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jun 2014 14:53:43 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Data-statement-not-working/m-p/1047641#M114499</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2014-06-23T14:53:43Z</dc:date>
    </item>
    <item>
      <title>No that's not it, as this is</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Data-statement-not-working/m-p/1047642#M114500</link>
      <description>&lt;P&gt;No that's not it, as that was a cut-down version of the real code which shows some data is being set, see below:&lt;/P&gt;

&lt;PRE class="brush:plain;"&gt;      character(20) :: rowt(6,12) = ' '

      data rowt(1,1:4) / ' '   ,'zfactg'   ,'rhog'   ,'viscg' /
      data rowt(2,1:1) / 'psat'                               /
      data rowt(3,1:9) / ' '   ,'liq_rv'   ,'rv'     ,'yfun'   ,'zfactg','rhoo'  ,'rhog'  ,'visco' ,'viscg' /

-        rowt(1,1:4)    {...}    CHARACTER(20) 
        rowt(1,1)    '                    '    CHARACTER(20) 
        rowt(1,2)    '                    '    CHARACTER(20) 
        rowt(1,3)    '                    '    CHARACTER(20) 
        rowt(1,4)    '                    '    CHARACTER(20) 
-        rowt(2,1:1)    {...}    CHARACTER(20) 
        rowt(2,1)    ' sa                 '    CHARACTER(20) 
-        rowt(3,1:9)    {...}    CHARACTER(20) 
        rowt(3,1)    '                    '    CHARACTER(20) 
        rowt(3,2)    ' i _rv              '    CHARACTER(20) 
        rowt(3,3)    'r                   '    CHARACTER(20) 
        rowt(3,4)    'y                   '    CHARACTER(20) 
        rowt(3,5)    'z    g              '    CHARACTER(20) 
        rowt(3,6)    'rhoo                '    CHARACTER(20) 
        rowt(3,7)    'rho                 '    CHARACTER(20) 
        rowt(3,8)    ' isco               '    CHARACTER(20) 
        rowt(3,9)    '  sc                '    CHARACTER(20) 
&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jun 2014 15:04:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Data-statement-not-working/m-p/1047642#M114500</guid>
      <dc:creator>Adrian_F_1</dc:creator>
      <dc:date>2014-06-23T15:04:00Z</dc:date>
    </item>
    <item>
      <title>From section 5.2.3,</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Data-statement-not-working/m-p/1047643#M114501</link>
      <description>&lt;P&gt;There is an initialization in the declaration on line-1 of #3. Lines-3, 4 and 5 provide alternative initializations for the same variable (&lt;STRONG&gt;rowt&lt;/STRONG&gt;).&lt;/P&gt;

&lt;P&gt;I cannot make sense of lines 7 and later in #3, if they are part of a Fortran source code..&lt;/P&gt;

&lt;P&gt;From section 5.2.3, "Initialization", of the Fortran Standard:&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;The appearance of &lt;/EM&gt;initialization &lt;EM&gt;in an &lt;/EM&gt;entity-decl &lt;EM&gt;for an entity without the PARAMETER attribute specifies that&amp;nbsp;the entity is a variable with explicit initialization. Explicit initialization alternatively may be specified in a DATA&amp;nbsp;statement unless the variable is of a derived type for which default initialization is specified.&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;...&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;A variable, or part of a variable, shall not be explicitly initialized more&amp;nbsp;than once in a program.&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jun 2014 15:21:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Data-statement-not-working/m-p/1047643#M114501</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2014-06-23T15:21:00Z</dc:date>
    </item>
    <item>
      <title>Lines 7 and later are showing</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Data-statement-not-working/m-p/1047644#M114502</link>
      <description>&lt;P&gt;Lines 7 and later are showing debugger output for the variable values from one of the the watch windows I think....&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jun 2014 18:43:41 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Data-statement-not-working/m-p/1047644#M114502</guid>
      <dc:creator>andrew_4619</dc:creator>
      <dc:date>2014-06-23T18:43:41Z</dc:date>
    </item>
    <item>
      <title>Quote:app4619 wrote:Lines 7</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Data-statement-not-working/m-p/1047645#M114503</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;app4619 wrote:&lt;BR /&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Lines 7 and later are showing debugger output for the variable values from one of the the watch windows I think....&lt;/SPAN&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;I wonder if the compiler should have refused to produce an EXE in this case, since the code has errors.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jun 2014 19:53:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Data-statement-not-working/m-p/1047645#M114503</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2014-06-23T19:53:00Z</dc:date>
    </item>
    <item>
      <title>Yes lines 7-&gt; are the debug</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Data-statement-not-working/m-p/1047646#M114504</link>
      <description>&lt;P&gt;Yes lines 7-&amp;gt; are the debug output lines which show the rather strange initialization of the array.&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;I would have hoped the declaration would have blanked out the entire array, then the DATA statement selectively assign values to certain elements. &amp;nbsp;In fact it did selectively assign values but very strangely...&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Steve?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jun 2014 20:09:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Data-statement-not-working/m-p/1047646#M114504</guid>
      <dc:creator>Adrian_F_1</dc:creator>
      <dc:date>2014-06-23T20:09:04Z</dc:date>
    </item>
    <item>
      <title>Put some standards checking</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Data-statement-not-working/m-p/1047647#M114505</link>
      <description>&lt;P&gt;Put some standards checking on and see if it throws some errors...&lt;/P&gt;

&lt;P&gt;However I am surprised it compiles because I don't think it is valid to initialise strings in that way. It looks like a case of 'garbage in garbage out' IMO but that said I don't think the compiler is behaving correctly.&lt;/P&gt;

&lt;P&gt;Data statements are very f77 there are other ways but if you only have a handful of the 6x12=72 elements set non-blank why not just assign those at run time otherwise you I think you need to initialise all 72 at FULL length (in your case 20) something like:&lt;/P&gt;

&lt;PRE class="brush:fortran;"&gt;character(len=4), save :: gt(8)=(/'1   ','2   ','10  ','20  ','50  ','100 ','1000','2000'/)&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jun 2014 20:28:49 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Data-statement-not-working/m-p/1047647#M114505</guid>
      <dc:creator>andrew_4619</dc:creator>
      <dc:date>2014-06-23T20:28:49Z</dc:date>
    </item>
    <item>
      <title>If you compile with /stand,</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Data-statement-not-working/m-p/1047648#M114506</link>
      <description>&lt;P&gt;If you compile with /stand, the compiler will do more error checking about initialization overlaps.&amp;nbsp; This, however, may cause a great increase in compile-time performance when there are many initializations to the same object (such as a COMMON block with a big DATA statement).&lt;/P&gt;

&lt;P&gt;And, yes, when there are multiple initializations to the same object, it is non-deterministic which initialization will ultimately override.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; --Lorri&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jun 2014 20:29:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Data-statement-not-working/m-p/1047648#M114506</guid>
      <dc:creator>Lorri_M_Intel</dc:creator>
      <dc:date>2014-06-23T20:29:05Z</dc:date>
    </item>
    <item>
      <title>Quote:Adrian F., #7 wrote:I</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Data-statement-not-working/m-p/1047649#M114507</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Adrian F., #7 wrote:&lt;BR /&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;I would have hoped the declaration would have blanked out the entire array, then the DATA statement selectively assign values to certain elements. &amp;nbsp;In fact it did selectively assign values but very strangely...&lt;/SPAN&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;The DATA statement is &lt;STRONG&gt;not executable&lt;/STRONG&gt;. The variables in the statement will be assigned the values specified, prior to the running of the program. The data may be placed in the initialized data segment, in which case the OS program loader takes care of the initialization, or the assignments can be made in the start-up code that is run before the program itself is given control.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jun 2014 21:50:07 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Data-statement-not-working/m-p/1047649#M114507</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2014-06-23T21:50:07Z</dc:date>
    </item>
    <item>
      <title>I know it is not executable,</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Data-statement-not-working/m-p/1047650#M114508</link>
      <description>&lt;P&gt;I know it is not executable, I just thought the compiler would do something a bit more sensible than what it did. &amp;nbsp; Or if it didn't know what to do, then issue a warning.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jun 2014 06:08:54 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Data-statement-not-working/m-p/1047650#M114508</guid>
      <dc:creator>Adrian_F_1</dc:creator>
      <dc:date>2014-06-24T06:08:54Z</dc:date>
    </item>
    <item>
      <title>C:\Projects&gt;ifort /c /stand t</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Data-statement-not-working/m-p/1047651#M114509</link>
      <description>&lt;PRE class="brush:plain;"&gt;C:\Projects&amp;gt;ifort /c /stand t.f90
Intel(R) Visual Fortran Compiler XE for applications running on IA-32, Version 14.0.2.176 Build 20140130
Copyright (C) 1985-2014 Intel Corporation.  All rights reserved.

t.f90(1): warning #5436: Overlapping storage initializations encountered with ROWT
character(20) :: rowt(6,12) = ' '
-----------------^&lt;/PRE&gt;

&lt;P&gt;The compiler allows you to have overlapping initializations as an extension and, as Lorri says, it warns you if you ask for standards warnings. It does know what to do with it but that may not be what you want.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jun 2014 18:23:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Data-statement-not-working/m-p/1047651#M114509</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2014-06-24T18:23:38Z</dc:date>
    </item>
    <item>
      <title>Thanks Steve,</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Data-statement-not-working/m-p/1047652#M114510</link>
      <description>&lt;P&gt;Thanks Steve,&lt;/P&gt;

&lt;P&gt;I have never used /stand (never heard of it until now). &amp;nbsp;But I guess I need to now invoke this as a default in all my projects, as clearly without it, I could get serious errors in my programs. &amp;nbsp;And as this is only a warning, I may need to look at warnings a little more seriously! &amp;nbsp;I will turn on /stand tomorrow and wait for the heavens to erupt.&lt;/P&gt;

&lt;P&gt;Adrian&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jun 2014 18:43:47 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Data-statement-not-working/m-p/1047652#M114510</guid>
      <dc:creator>Adrian_F_1</dc:creator>
      <dc:date>2014-06-24T18:43:47Z</dc:date>
    </item>
    <item>
      <title>/stand warns you about non</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Data-statement-not-working/m-p/1047653#M114511</link>
      <description>&lt;P&gt;/stand warns you about non-standard usage. It can help reveal things you might not want to do, but will also warn of extensions you deliberately use.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jun 2014 19:51:19 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Data-statement-not-working/m-p/1047653#M114511</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2014-06-24T19:51:19Z</dc:date>
    </item>
    <item>
      <title>Quote:Steve Lionel (Intel)</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Data-statement-not-working/m-p/1047654#M114512</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Steve Lionel (Intel) wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;/stand warns you about non-standard usage. It can help reveal things you might not want to do, but will also warn of extensions you deliberately use.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;But you can suppress warning numbers you are happy with e.g.&amp;nbsp;&amp;nbsp;/stand /Qdiag-disable:7025,5142,6477&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jun 2014 20:10:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Data-statement-not-working/m-p/1047654#M114512</guid>
      <dc:creator>andrew_4619</dc:creator>
      <dc:date>2014-06-24T20:10:36Z</dc:date>
    </item>
    <item>
      <title>I turned on /stand and</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Data-statement-not-working/m-p/1047655#M114513</link>
      <description>&lt;P&gt;I turned on /stand and selectively disabled those numbers I was happy with, and found some bugs!&lt;/P&gt;

&lt;P&gt;Thanks for the help, Adrian&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jun 2014 13:00:19 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Data-statement-not-working/m-p/1047655#M114513</guid>
      <dc:creator>Adrian_F_1</dc:creator>
      <dc:date>2014-06-25T13:00:19Z</dc:date>
    </item>
  </channel>
</rss>

