[Bug fortran/84594] Warning: Use of the NUMERIC_STORAGE_SIZE named constant from intrinsic module ISO_FORTRAN_ENV at (1) is incompatible with option -fdefault-integer-8

dominiq at lps dot ens.fr gcc-bugzilla@gcc.gnu.org
Wed Feb 28 16:49:00 GMT 2018


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84594

--- Comment #4 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
> > (1) AFAICT this not documented. Is NUMERIC_STORAGE_SIZE the only parameter in
> > ISO_FORTRAN_ENV triggering a warning?
> 
> Don't know.  But, it is obviously a correct warning
> as -fdefault-integer-8 applies to only the default
> integer kind while NUMERIC_STORAGE_SIZE applies to
> all numeric types.
>
> > (2) The warning is not emitted with -fdefault-real-10 nor with
> > -fdefault-real-16. I guess this was overlooked when these options were added.
> > 
> > (3) The options -finteger-4-integer-8 and -freal-*-real-* don't trigger the
> > warning. Is it because they change all the occurrences of INT or REAL, while
> > -fdefault-* only change the implicit ones?
> AFAIK, Yes.  INTEGER(4) is known to the compiler with -finteger-4-integer-8,
> the user simply cannot use it as internally gfortran map everything
> to INTEGER(8) as-if the user actually ported the code.   In other words,
> storage association isn't broken by these options.

Do you at least agree that

(a) || flag_default_real_10 || flag_default_real_16 should be added
to flag_default_integer || flag_default_real_8 in module.c,

(b) the warning should be documented?


More information about the Gcc-bugs mailing list