Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Overlapping storage initialization warning

IanH
Honored Contributor II
1,049 Views

Who or what is behind warnings such as "#5436: Overlapping storage initializations encountered with .T1386__dv_template_V$749", and why are they/it picking mercilessly on my deferred length allocatable character variables?

0 Kudos
17 Replies
Steve_Lionel
Honored Contributor III
1,049 Views

Normally that warning happens only for DATA statements that try to initialize the same element of an array more than once. If you're seeing it for compiler-generated temps, that's a compiler bug. The Intel folks would like you to submit a sample program through the Service Portal.

0 Kudos
FortranFan
Honored Contributor II
1,049 Views

Steve Lionel (Ret.) wrote:

Normally that warning happens only for DATA statements that try to initialize the same element of an array more than once. If you're seeing it for compiler-generated temps, that's a compiler bug. The Intel folks would like you to submit a sample program through the Service Portal.

IanH didn't give any details but I presume the warning about "#5436: Overlapping storage .." was noticed with compiler 18.0 BETA.  For that is my experience, I do not get the warnings with compiler 17.0 including update 4 but do see it with 18.0 BETA even update 1.  Now readers please note I reported this at the Online Service Center quite a while ago, almost soon after the BETA evaluation period started.

For those interested, here is an example case:

module m
contains
   function foo()
      character(len=:), allocatable :: foo
      character(len=:), allocatable :: s
   end function foo
end module

Upon compilation,

Compiling with Intel(R) Visual Fortran Compiler 18.0.0.083 [Intel(R) 64]...
m.f90
..
m.f90(5): warning #5436: Overlapping storage initializations encountered with .T24__dv_template_V$1d

 

0 Kudos
IanH
Honored Contributor II
1,049 Views

I tried that with firefox and didn't get very far...

but_i_tried.png

Chrome seems to work for me, but that site is a pretty mediocre interface for reporting software issues.

0 Kudos
FortranFan
Honored Contributor II
1,049 Views

ianh wrote:

.. that site is a pretty mediocre interface for reporting software issues.

"..  pretty mediocre interface.." is being most polite.

Two points to note in case anyone from Intel reads this:

  1. How can the issue with the spurious warning mentioned in the original post of this thread even get past the alpha testing phase of compiler 18.0?  I see tons of such warnings in almost every one of the programs I tested, so how come it wasn't noticed during the development phase itself?
  2. Online Server Center (OSC) is *infinitely* poorer than the previous Intel Premier Support (IPS) site, not that the latter was without problems.  If nothing else, please look into bringing back the IPS system until the OSC can be completely revamped.  By the way, how come no one at Intel noticed a basic issue that a customer, while reporting a new issue, is not prompted right away to provide any comments or description of the problem, the only option is to attach files.  The customer then has to go back and edit the incident to enter in the supporting details.  It's very unfortunate to see such a design for a web interface.
0 Kudos
andrew_4619
Honored Contributor II
1,049 Views

I fully agree with the comments in #4 and #5

0 Kudos
Mark_Lewy
Valued Contributor I
1,049 Views

I too have reported this issue for the initial beta release (#02770369), but haven't had any updates since an acknowledgement that it has been escalated to development to fix.  I therefore assume update 1 has the same issue, but can't verify because of another regression (#02873832).

I also agree with FortranFan's point 2 about OSC: it seems the process is create an issue is a bit back-to-front!

0 Kudos
Mark_Lewy
Valued Contributor I
1,049 Views

Having worked around my regression, I still get this warning with 18.0.0.083 on allocatable deferred length scalars.

0 Kudos
Devorah_H_Intel
Moderator
1,049 Views

This issue was fixed. Did you try 18.0 Beta Update 1?

0 Kudos
Devorah_H_Intel
Moderator
1,049 Views

FortranFan, 

Both points are good. Thank you for the feedback.

0 Kudos
IanH
Honored Contributor II
1,049 Views
>type blat.f90
MODULE m
CONTAINS
  SUBROUTINE s
    CHARACTER(:), ALLOCATABLE :: x, y
  END SUBROUTINE s
END MODULE m

>ifort /nologo /debug:full /Od /standard-semantics /stand:f03 /warn:all /traceback /check:all /libs:static /threads /dbglibs /c blat.f90
blat.f90(4): remark #7712: This variable has not been used.   
    CHARACTER(:), ALLOCATABLE :: x, y
---------------------------------^
blat.f90(4): remark #7712: This variable has not been used.   
    CHARACTER(:), ALLOCATABLE :: x, y
------------------------------------^
blat.f90(4): warning #5436: Overlapping storage initializations encountered with .T17__dv_template_V$1d
    CHARACTER(:), ALLOCATABLE :: x, y
---------------------------------^

 

0 Kudos
jimdempseyatthecove
Honored Contributor III
1,049 Views

IanH,

What happens when you "use" the variables?

The compiler in an attempt to remove dead code, would at some point remove the descriptors for the unused characters (with deferred length). At this point, X and Y are "null" strings, and thus may refer to the same address.

Jim Dempsey

0 Kudos
Steve_Lionel
Honored Contributor III
1,049 Views

Ian's source still gets the overlapping storage message with 18.0 Beta Update 1. This has to do with a temporary that the compiler creates and is definitely a compiler bug.

0 Kudos
IanH
Honored Contributor II
1,049 Views

Oops, that was supposed to have the version information in it (18.0.0.083) , but I ran with /nologo by accident.  The warning goes away if you remove /stand:f03 - go figure.

0 Kudos
Steve_Lionel
Honored Contributor III
1,049 Views

Now that's interesting, considering that /stand is not supposed to affect generated code in any way. (But there have been bugs before where it did.)

0 Kudos
Devorah_H_Intel
Moderator
1,049 Views

Ian,

I will add your test case to the case. Thank you for the report.

0 Kudos
Lorri_M_Intel
Employee
1,049 Views

RE: To Steve:

If you request standards checking, we enable the compile-time initialization-overlapping checks because it's not standard to have overlapping initializations.  Obviously the bug is that we - for some reason - thought that the temporary was sharing space with something else.

0 Kudos
Devorah_H_Intel
Moderator
1,049 Views

This was indeed fixed but the fix will be available in the 18.0 Compiler release. The fix didn't make it to Beta.

0 Kudos
Reply