- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
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
コピーされたリンク
2 返答(返信)
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
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
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
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.
