]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fortran: Fix wrong recursive errors and class initialization [PR112407]
authorPaul Thomas <pault@gcc.gnu.org>
Tue, 2 Apr 2024 13:19:09 +0000 (14:19 +0100)
committerPaul Thomas <pault@gcc.gnu.org>
Mon, 6 May 2024 09:54:43 +0000 (10:54 +0100)
commitf598a1c8a77e678ca009b433fd849b4834594926
tree917e0ed4b0bf49512584ee2eedd68260e7462c90
parent9f204cc695d27d0b8eb69d9a4d266261171185ae
Fortran: Fix wrong recursive errors and class initialization [PR112407]

2024-04-02  Paul Thomas  <pault@gcc.gnu.org>

gcc/fortran
PR fortran/112407
* resolve.cc (resolve_procedure_expression): Change the test for
for recursion in the case of hidden procedures from modules.
(resolve_typebound_static): Add warning for possible recursive
calls to typebound procedures.
* trans-expr.cc (gfc_trans_class_init_assign): Do not apply
default initializer to class dummy where component initializers
are all null.

gcc/testsuite/
PR fortran/112407
* gfortran.dg/pr112407a.f90: New test.
* gfortran.dg/pr112407b.f90: New test.

(cherry picked from commit 35408b3669fac104cd380582b32e32c64a603d8b)
gcc/fortran/resolve.cc
gcc/fortran/trans-expr.cc
gcc/testsuite/gfortran.dg/pr112407a.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/pr112407b.f90 [new file with mode: 0644]