This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Gfortran does not compile dynamo (and others)


Hi,

Milan Hodscek wrote:
> Steve Kargl <sgk <at> troutmask.apl.washington.edu> writes:
>   
>> Why do you need this patch
>>
>> -      Data IEOW/1/,IEOS/3/,IH0/1h0/,IHI/1hI/,NWFILE/1H <at> /,BLANK/'    '/
>> +      Data IEOW/1/,IEOS/3/,IH0/1h0/,IHI/1hI/,NWFILE/1H <at> /
>> +      Data BLANK/4h    /
>>
>> Is there a problem with gfortran?
>>     
>
> This is what I get:
>
> milan@s8 ~/proj/g03gfortran $ cat hos.f
>       integer blank
>       data blank/'    '/
>       end
> milan@s8 ~/proj/g03gfortran $ gfortran -o hos hos.f
>  In file hos.f:2
>
>       data blank/'    '/                                                
>                 1
> Error: Incompatible types in assignment at (1), CHARACTER(1) to INTEGER(4)
>   
gfortran is right, but other compilers accept it. "ifort -warn all
-stand f95" warns:

fortcom: Warning: bar.f90, line 2: Fortran 95 does not allow this data
initialization.   ['    ']
       data blank/'    '/
------------------^
fortcom: Warning: bar.f90, line 2: A character string or Hollerith
string is non-standard in this context.   ['    ']
       data blank/'    '/
------------------^

Tobias


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]