[Bug fortran/108369] FM509 Fails to compile with error
sgk at troutmask dot apl.washington.edu
gcc-bugzilla@gcc.gnu.org
Fri Jan 13 15:29:24 GMT 2023
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108369
--- Comment #12 from Steve Kargl <sgk at troutmask dot apl.washington.edu> ---
On Fri, Jan 13, 2023 at 11:49:44AM +0000, ben.brewer at codethink dot co.uk
wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108369
>
> --- Comment #11 from Ben Brewer <ben.brewer at codethink dot co.uk> ---
> So I was using "-x f77" which I would expect to instruct the compiler to run in
> a mode compatible with Fortran 77, it seems non-intuitive to have to enable
> -std=legacy to compile the very tests which define f77.
>
gfortran started life as a Fortran 95 compiler with a bunch of
extensions. The -x f77 option might be a relic from g77 and
only effects whether one has fixed source form code or free
source form code. "f77" appears twice in gcc.info under the
description of the -x option. The meaning of "-x f77" isn't
actually documented.
To set the Fortran standard conformance, use the -std option (e.g.,
-std=legacy, -std=f95, -std=f2003, -std=f2008, -std=f2018). There
isn't an -std=f77, If one is compiling old code, it is recommended
to use -std=legacy to turn off a bunch of warning/errors.
More information about the Gcc-bugs
mailing list