File which compiles fine under G77 (and ifort) fails under gfortran
Arjen Markus
arjen.markus895@gmail.com
Wed Mar 23 11:50:00 GMT 2011
Hello Patrick,
gfortran 4.6.0 gives the same (or at least very similar) errors, but
it is quite correct:
NAME is not defined as being a character string and therefore
assigning a character
string to it is illegal. The fact that g77 accepts this and that ifort
does not complain
(unless you give it an option like /warn:stderrors) does not really matter.
I have tried several options, like -std=legacy and -std=gnu, but the
compiler will not accept
this.
The best way, I guess, to make progress is to fix the errors, as they
_are_ errors.
Regards,
Arjen
2011/3/23 Patrick Alken <alken@colorado.edu>:
> I have attached a fortran 77 file which compiled fine using:
>
> GNU Fortran (GCC) 3.4.6 20060404 (Red Hat 3.4.6-4.1)
>
> I am trying to migrate to use gfortran, and currently am using version:
>
> GNU Fortran (Ubuntu 4.4.3-4ubuntu5) 4.4.3
>
> (I know its not the latest version but I am not the system administrator so
> I cannot install the latest)
>
> Unfortunately, the newer gfortran program fails to compile the file
> (gfortran -g -c gtd.f), giving the errors:
>
> Error: Incompatible types in assignment at (1), CHARACTER(1) to INTEGER(4)
> In file gtd.f:1670
>
> DATA ISDATE/'01-F','EB-0','2 '/,ISTIME/'15:4','9:27'/
> 1
> Error: Incompatible types in assignment at (1), CHARACTER(1) to INTEGER(4)
> In file gtd.f:1670
>
> DATA ISDATE/'01-F','EB-0','2 '/,ISTIME/'15:4','9:27'/
> 1
> Error: Incompatible types in assignment at (1), CHARACTER(1) to INTEGER(4)
>
> These errors did not appear when using g77 -g -c gtd.f
>
> I also tried using ifort (IFORT) 12.0.2 20110112 to compile the file and it
> also worked without error.
>
> Possibly this problem has been fixed in the latest gfortran but I can't
> check since I can only use the version on the current system. Any help in
> this matter is appreciated!
>
> Patrick Alken
>
>
More information about the Fortran
mailing list