Re: [PATCH] PR122597 -fdefault-integer-8 is results in wrong v_list in user defined IO

Harald Anlauf <[email protected]>
Newsgroups gmane.comp.gcc.patches,gmane.comp.gcc.fortran
Message-ID <[email protected]>
Hi Jerry,

Am 22.12.25 um 04:00 schrieb Jerry D:
> The attached patch from Steve issues an error if a user trys to use DTIO
> with -fdefault-integer-8. I reduced the test case and set it up for the
> testsuite.  Some may think this is a bit harsh, but one would get silent
> wrong results otherwise.

I think it is fine to reject it.  If you believe the message is too
harsh, how about:

"Sorry: -fdefault-integer-8 is not supported with user-defined 
input/output at %C"

I leave the final decision at your discretion.

OK for mainline, and thanks for the patch!

Harald

> Regression tested on x86_64.
> 
> OK for mainline?
> 
> Regards,
> 
> Jerry
> 
> Author: Steve Kargl <[email protected]>
> Date:   Sun Dec 21 18:32:46 2025 -0800
> 
>      fortran [PR122957] DTIO incompatibility with -fdefault-interger-8
> 
>      The -fdefault-integer-8 option is optional to assist with legacy
>      fortran codes. It is not a Stndard requirement and is not
>      compatible with the newer user defined derived type I/O.
> 
>              PR fortran/122957
> 
>      gcc/fortran/ChangeLog:
> 
>              * interface.cc (gfc_match_generic_spec): Issue an error
>              so that users do not use -fdefault-integer-8 with DTIO.
> 
>      gcc/testsuite/ChangeLog:
> 
>              * gfortran.dg/pr122957.f90: New test.
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.