File which compiles fine under G77 (and ifort) fails under gfortran

Tim Prince n8tm@aol.com
Wed Mar 23 12:36:00 GMT 2011


On 3/23/2011 4:50 AM, Arjen Markus wrote:

> 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

>>
>>
Needless to say, it's not Fortran 77, although there is some f77 mixed 
in.  The very first Fortran 77 compiler we tried, in 1978, refused all 
manner of extended f66.  Are you serious, was someone still writing 1970 
IBM-dependent style code in 2002?

-- 
Tim Prince



More information about the Fortran mailing list