Question about source file location when one uses #line 1 "example2.in" directive

Martin Liška mliska@suse.cz
Wed Apr 26 11:10:00 GMT 2017


On 04/19/2017 05:06 PM, Steve Kargl wrote:
> On Wed, Apr 19, 2017 at 04:18:28PM +0200, Martin Liška wrote:
>> prefix is parsed. To be honest, I'm not able to compile a pre-processed Fortran file:
>>
>> $ gfortran example2.f90 --coverage -cpp  -E > example.f
> 
>>
>> $ gfortran example.f --coverage
>> example2.in:6:1:
>>
>>   PROGRAM example2
>>   1
>> Error: Non-numeric character in statement label at (1)
>> example2.in:6:1:
> 
> You need to understand the filename suffix convention.
> A filename ending in .f is assumed to be in fixed-form
> format.  A filename ending in .f90 is in free-form
> format.  See the gfortran for a complete description
> of the filename convention.  If the output of your
> first command line does not conform to the fixed-form
> format for .f (or free-form format for .f90), then 
> gfortran will chock with your second command line.
> 

Thanks for clarification, works for me :)
(as one can see here: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78792#c3)

Martin



More information about the Fortran mailing list