Hi Thomas!
Am 11.04.25 um 17:50 schrieb Thomas Koenig:
Hello world,
the attached patch fixes an ICE by setting the typespec of a dummy
argument from a global function if known. plus setting the correct flag.
This also removes the corresponding assert. I'm not quite sure that the
code with the subroutine attribute can be reached, but I thought better
safe than sorry.
Agreed.
Most of the patch is actually reformatting due to the 80-column-rule.
(Do we really want to keep that for gfortran?)
Yes, please.
Regression-tested. OK for trunk?
There is a duplicate "and and" here:
+ gfc_error ("Mismatch between subroutine and and "
+ "function at %L", &actual->where);
OK with this fixed.
Thanks for the patch!
Harald
Best regards
Thomas
Fix ICE in compare_parameter.
gcc/fortran/ChangeLog:
PR fortran/119669
* interface.cc (compare_parameter): Error when mismatch between
formal argument as subroutine and function. If the dummy
argument is a known function, set its typespec.
gcc/testsuite/ChangeLog:
PR fortran/119669
* gfortran.dg/interface_59.f90: New test.