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

ifort doesn't "ASSIGN x TO y"?

jenwang
Beginner
908 Views

Hi,
I have a program named foo.f that has many statements such as

IF ( condition >) THEN
ASSIGN 100 TO IGO2
...

100
...
GO TO IGO2

I can compile in g77 and the executable produces correct result. But when I compiled using ifort, I got the warning:

ifort -c foo.f
fortcomp: Warning: foo.f, line xx: A jump into a block from outside the block may have occurred.
GO TO IGO2
^

Where line xx is the statement "GO TO IGO2". The executable produces a core dump.
It seems that ifort doesn't recognize that the label IGO2 has been assigned to 100, which is a valid label. Can anyone help? Thanks!

Jeni

0 Kudos
2 Replies
madhu_iitc
Beginner
908 Views
since u r source code is in fixed format (f77)..i guess u have to make changes to the command , which u r using to compile.
try ifort -FI filename or ifort -f77rtl filename
0 Kudos
Steven_L_Intel1
Employee
908 Views
The compiler does support assigned goto. We would need to see a complete program to undertstand what is going wrong. The warning message suggests that you have an illegal branch back inside an IF or DO block, which can cause unpredictable results.
0 Kudos
Reply