Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29245 ディスカッション

ifort doesn't "ASSIGN x TO y"?

jenwang
ビギナー
881件の閲覧回数

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 件の賞賛
2 返答(返信)
madhu_iitc
ビギナー
881件の閲覧回数
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
Steven_L_Intel1
従業員
881件の閲覧回数
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.
返信