]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fortran: Fix regressions with intent(out) class[PR115070, PR115348].
authorPaul Thomas <pault@gcc.gnu.org>
Tue, 5 Nov 2024 15:54:45 +0000 (15:54 +0000)
committerPaul Thomas <pault@gcc.gnu.org>
Tue, 5 Nov 2024 15:55:15 +0000 (15:55 +0000)
commitc16e4ecd8fdc2230a313fe795333fa97652ba19f
treed4eb8ea9756bf3616ae070feaac32d0e9ce46833
parentd0fe096766139a068ba7030ce9d4b82e534abe22
Fortran: Fix regressions with intent(out) class[PR115070, PR115348].

2024-11-05  Paul Thomas  <pault@gcc.gnu.org>

gcc/fortran
PR fortran/115070
PR fortran/115348
* trans-expr.cc (gfc_trans_class_init_assign): If all the
components of the default initializer are null for a scalar,
build an empty statement to prevent prior declarations from
disappearing.

gcc/testsuite/
PR fortran/115070
* gfortran.dg/ieee/pr115070.f90: New test.

PR fortran/115348
* gfortran.dg/pr115348.f90: New test.
gcc/fortran/trans-expr.cc
gcc/testsuite/gfortran.dg/ieee/pr115070.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/pr115348.f90 [new file with mode: 0644]