]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fortran: F2018 GENERIC statement is missing [PR121182]
authorPaul Thomas <pault@gcc.gnu.org>
Sat, 9 Aug 2025 10:40:09 +0000 (11:40 +0100)
committerPaul Thomas <pault@gcc.gnu.org>
Sat, 9 Aug 2025 10:40:09 +0000 (11:40 +0100)
commit9e584501f6cc5a571b5f89972a1f458394c92f58
treeeb9d8c2eb11bbe34d1da0d235c8bd9d530626428
parentfe837dc02bbf80f6907ed8c1065fe12688b8ea95
Fortran: F2018 GENERIC statement is missing [PR121182]

2025-08-09  Paul Thomas  <pault@gcc.gnu.org>

gcc/fortran
PR fortran/121182
* decl.cc (match_generic_stmt): New function based on original
gfc_match_generic but feeding namespace rather than typebound
generics.
(match_typebound_generic): Renamed original gfc_match_generic.
(gfc_match_generic): New function that selects between type
bound generic and other generic statements and calls one of the
above two functions as appropriate.
* parse.cc (decode_specification_statement): Allow generic
statements.
(parse_spec): Accept a generic statement in a specification
block.

gcc/testsuite/
PR fortran/121182
* gfortran.dg/generic_stmt_1.f90: New test.
* gfortran.dg/generic_stmt_2.f90: New test.
* gfortran.dg/generic_stmt_3.f90: New test.
* gfortran.dg/generic_stmt_4.f90: New test.
gcc/fortran/decl.cc
gcc/fortran/parse.cc
gcc/testsuite/gfortran.dg/generic_stmt_1.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/generic_stmt_2.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/generic_stmt_3.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/generic_stmt_4.f90 [new file with mode: 0644]