- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
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
- Balises:
- Intel® Fortran Compiler
Lien copié
2 Réponses
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
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
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
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.

Répondre
Options du sujet
- S'abonner au fil RSS
- Marquer le sujet comme nouveau
- Marquer le sujet comme lu
- Placer ce Sujet en tête de liste pour l'utilisateur actuel
- Marquer
- S'abonner
- Page imprimable