[PATCH, Fortran] Extension: Support legacy PARAMETER statements with -std=legacy (or -fdec?)

Manfred Schwarb manfred99@gmx.ch
Thu Nov 3 11:56:00 GMT 2016


Am 03.11.2016 um 12:16 schrieb Fritz Reese:
> On Wed, Nov 2, 2016 at 3:38 PM, Jerry DeLisle <jvdelisle@charter.net> wrote:
>> On 11/02/2016 08:47 AM, Fritz Reese wrote:
>>>
>>> Attached is a patch for the GNU Fortran front-end which allows the
>>> compiler to interpret these legacy PARAMETER statements. The patch in
>>> its current form does this without warning through -std=legacy
>>> (warning for -std=gnu, error for -std=f*). Bootstraps and regtests on
>>> x86_64-redhat-linux.
>>
>> How does the behavior compare to G77 current behavior. Often we use
>> -std=legacy to maintain compatibility with G77, so we do not want to break
>> anything there, though I realize we can not be perfect in all cases.
>>
> 
> I don't know. I don't have a copy of g77, and the code seems to have
> been successfully scrubbed from the searchable internet.
> 

I found an ancient copy of g77 on my platter and copied it to
http://gfortran.meteodat.ch/download/legacy_g77/

It works for me using the appropriate LD_LIBRARY_PATH settings and invoking it
with "g77 -m32 -Wa,--32".
However I can't give any guaranties, of course...

Cheers,
Manfred


> I can say the Intel Fortran compiler simply accepts these parameter
> statements by default. It will only warn you about it if you give it
> an explicit standard on the command-line, and even then will still
> interpret them as PARAMETER statements. So as far as I can tell,
> legacy compilers would never interpret "parameterblah = ..." as
> assignment to "parameterblah".
> 
> ---
> Fritz Reese
> 



More information about the Fortran mailing list