diff options
author | Paul Thomas <pault@gcc.gnu.org> | 2015-12-18 09:34:13 +0000 |
---|---|---|
committer | Paul Thomas <pault@gcc.gnu.org> | 2015-12-18 09:34:13 +0000 |
commit | 332477628507525e3f252183a864d74bddb5c77f (patch) | |
tree | 1b2e25c60d3d7bb04a7d724be4b7db3f4f541b17 /gcc/fortran/expr.c | |
parent | 6638efce562e68d702d859c124ed36c7a8c55556 (diff) | |
download | gcc-332477628507525e3f252183a864d74bddb5c77f.zip gcc-332477628507525e3f252183a864d74bddb5c77f.tar.gz gcc-332477628507525e3f252183a864d74bddb5c77f.tar.bz2 |
re PR fortran/68196 (ICE on function result with procedure pointer component)
2015-12-18 Paul Thomas <pault@gcc.gnu.org>
PR fortran/68196
*expr.c (gfc_has_default_initializer): Prevent infinite recursion
through this function for procedure pointer components.
* trans-array.c (structure_alloc_comps): Ditto twice.
2015-12-18 Paul Thomas <pault@gcc.gnu.org>
PR fortran/68196
* gfortran.dg/proc_ptr_48.f90: New test.
From-SVN: r231807
Diffstat (limited to 'gcc/fortran/expr.c')
-rw-r--r-- | gcc/fortran/expr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c index 5dd90ef..5d7bcee 100644 --- a/gcc/fortran/expr.c +++ b/gcc/fortran/expr.c @@ -3930,7 +3930,7 @@ gfc_has_default_initializer (gfc_symbol *der) for (c = der->components; c; c = c->next) if (c->ts.type == BT_DERIVED) { - if (!c->attr.pointer + if (!c->attr.pointer && !c->attr.proc_pointer && gfc_has_default_initializer (c->ts.u.derived)) return true; if (c->attr.pointer && c->initializer) |