]> 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>
Tue, 2 Apr 2024 13:19:09 +0000 (14:19 +0100)
commit35408b3669fac104cd380582b32e32c64a603d8b
tree28a98e943fc5108c8b16c881ae1ff5fe18bd1d7f
parent9a5e4aade2b847c5262577a1490ce6f3df9a9841
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.
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]