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

ifort error ("A continuation character is illegal on a line with a statement label")

jpphd
초급자
1,528 조회수
Hi,

When I try do compile a Fortran 77 program,

ifort -g -c -o xxx-compilefile.o `test -f 'compilefile.f' || echo '../../../src/'`compilefile.f ,

a lot of errors appear, such as:

"error #5148: A continuation character is illegal on a line with a statement label"
"error #5082: Syntax error" (Ex: found IDENTIFIER 'PE10' when expecting one of: * ) :: )
.
.
.
"(4451): catastrophic error: Too many errors, exiting"

Any ideas how it can compile properly?

Some info:

ifort -V
Intel Fortran Compiler Professional for applications running on Intel 64, Version 11.0 Build 20090131 Package ID: m_cprof_p_11.0.059

gcc --version
i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5490)

g++ --version
g++ (GCC) 4.0.1 (Apple Inc. build 5490)

sw_vers
ProductName: Mac OS X
ProductVersion: 10.5.6
BuildVersion: 9G55

Thanks, JP

0 포인트
1 응답
TimP
명예로운 기여자 III
1,528 조회수
Quoting - jpphd

When I try do compile a Fortran 77 program,

ifort -g -c -o xxx-compilefile.o `test -f 'compilefile.f' || echo '../../../src/'`compilefile.f ,

a lot of errors appear, such as:

"error #5148: A continuation character is illegal on a line with a statement label"
"error #5082: Syntax error" (Ex: found IDENTIFIER 'PE10' when expecting one of: * ) :: )
You should have a lot more ideas than we could have, sight unseen. Why not write it out as separate steps in a Makefile, and look at the file which is passed to ifort, particularly the problematic lines? How can you assert it is f77 but not be willing to show it? If it is actually f77, does ifort take it as a fixed form source file, or somethine else?
0 포인트
응답