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

Illegal character in statement label field (module statement in .f file)

psing51
New Contributor I
1,416 Views

Hi ,
I am trying to compile a fortran file and i get following error - 

mpiifort -c -O3 -march=core-avx2 -convert big_endian -DLINUX -fp-model precise -assume byterecl   -integer-size 32 -real-size 32 sigio_module.f
sigio_module.f(2): error #5149: Illegal character in statement label field  [m]
module sigio_module
^
sigio_module.f(2): error #5149: Illegal character in statement label field  [o]
module sigio_module
-^
sigio_module.f(2): error #5149: Illegal character in statement label field  [d]
module sigio_module
--^
sigio_module.f(2): error #5149: Illegal character in statement label field  [u]
module sigio_module
---^
sigio_module.f(2): error #5149: Illegal character in statement label field  [l]
module sigio_module
----^
sigio_module.f(2): error #5118: First statement in file must not be continued
module sigio_module
-----^

 
I have attached the file herewith.
Do i need to use any flag to make the compilation work ?

0 Kudos
1 Solution
mecej4
Honored Contributor III
1,370 Views

The .f source file suffix is for fixed format files. For free format files, use the .f90 suffix, or use the /free compiler option.

When you see a large number of error messages from the compiler for a source file that you believe to be error-free, check the compiler options and the file name and suffix, and make sure that the usual name conventions (of .f for fixed format and .f90 for free format Fortran) are followed.

View solution in original post

0 Kudos
1 Reply
mecej4
Honored Contributor III
1,371 Views

The .f source file suffix is for fixed format files. For free format files, use the .f90 suffix, or use the /free compiler option.

When you see a large number of error messages from the compiler for a source file that you believe to be error-free, check the compiler options and the file name and suffix, and make sure that the usual name conventions (of .f for fixed format and .f90 for free format Fortran) are followed.

0 Kudos
Reply