- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page