diff options
author | Thomas Koenig <tkoenig@gcc.gnu.org> | 2025-05-06 18:05:41 +0200 |
---|---|---|
committer | Thomas Koenig <tkoenig@gcc.gnu.org> | 2025-05-11 07:47:59 +0200 |
commit | 7b38bab21a126512c17c8084ad78b6bf75fc1437 (patch) | |
tree | 0cf24d23a4b26a3b976b7b8907de99952dfff3c3 /gcc/c/c-parser.cc | |
parent | bdcef06d8bb6abca31ac6cd9008648dd578b9b15 (diff) | |
download | gcc-7b38bab21a126512c17c8084ad78b6bf75fc1437.zip gcc-7b38bab21a126512c17c8084ad78b6bf75fc1437.tar.gz gcc-7b38bab21a126512c17c8084ad78b6bf75fc1437.tar.bz2 |
Fix PR 119928, formal arguments used to wrongly inferred for CLASS.
The problem was indeed that generating a formal from an actual
arglist is a bad idea when classes are involved. Fixed in the
attached patch. I think it still makes sense to remove the checks
when the other attributes are present (or PR96073 may come back
in different guise, even if I have to test case at present).
I have also converted the test to a run-time check.
gcc/fortran/ChangeLog:
PR fortran/119928
* interface.cc (gfc_check_dummy_characteristics): Do not issue
error if one dummy symbol has been generated from an actual
argument and the other one has OPTIONAL, INTENT, ALLOCATABLE,
POINTER, TARGET, VALUE, ASYNCHRONOUS or CONTIGUOUS.
(gfc_get_formal_from_actual_arglist): Do nothing if symbol
is a class.
gcc/testsuite/ChangeLog:
PR fortran/119928
* gfortran.dg/interface_60.f90: New test.
Diffstat (limited to 'gcc/c/c-parser.cc')
0 files changed, 0 insertions, 0 deletions