re PR fortran/83183 (Out of memory with option -finit-derived)
authorFritz Reese <fritzoreese@gmail.com>
Thu, 5 Jul 2018 15:39:27 +0000 (15:39 +0000)
committerFritz Reese <foreese@gcc.gnu.org>
Thu, 5 Jul 2018 15:39:27 +0000 (15:39 +0000)
commit245471c67f3ad27a85dce999933cec1ff298be02
tree96efcde3808b455ef5b17183af71299b892cac60
parent5a1b56cc9843425557fc9ccbcf99aabfc7028123
re PR fortran/83183 (Out of memory with option -finit-derived)

2018-07-05  Fritz Reese  <fritzoreese@gmail.com>

    gcc/fortran/ChangeLog:

PR fortran/83183
PR fortran/86325
* expr.c (class_allocatable, class_pointer, comp_allocatable,
comp_pointer): New helpers.
(component_initializer): Generate EXPR_NULL for allocatable or pointer
components. Do not generate initializers for components within BT_CLASS.
Do not assign to comp->initializer.
(gfc_generate_initializer): Use new helpers; move code to generate
EXPR_NULL for class allocatable components into component_initializer().

    gcc/testsuite/ChangeLog:

PR fortran/83183
PR fortran/86325
* gfortran.dg/init_flag_18.f90: New testcase.
* gfortran.dg/init_flag_19.f03: New testcase.

From-SVN: r262442
gcc/fortran/ChangeLog
gcc/fortran/expr.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/init_flag_18.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/init_flag_19.f03 [new file with mode: 0644]