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

Issue with allocatable strings and O1, O2 and O3 (IFX)

Olsen__Oystein
Beginner
311 Views

Hi,

 

I have an issue with the IFX- compiler. The attached program works with -O0, but not -O1, -O2 and -O3. (It works with ifort, gfortran and nagfor).

Commands to compile with -O1, and to run the test program:

make O1
./bug_string

Use corresponding commands for -O0, -O2 and -O3. The expected output is:

 # --epoch#
 
 # --epoch#

With -O1 I get:

 # --     #
 
 # --     #

The weird thing is that I get the expected results if I uncomment line 65 in the code. That line only writes a few character to stdout, and should have no effect at all.

 

0 Kudos
2 Replies
Olsen__Oystein
Beginner
147 Views

As with my other issue, this too works when adding --noauto as an option to the compiler, and works with ifort 2021.8.0.

 

Regards,

Øystein

0 Kudos
Devorah_H_Intel
Moderator
72 Views

I was able to reproduce the issue reported here. This case is now escalated to compiler engineering. 

0 Kudos
Reply