aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran
diff options
context:
space:
mode:
authorJanus Weil <janus@gcc.gnu.org>2011-02-01 15:59:40 +0100
committerJanus Weil <janus@gcc.gnu.org>2011-02-01 15:59:40 +0100
commit0f0a4367ab5ac7d0dd1fa8eb0acba3ddc063f619 (patch)
treeececc70c40c0ef1e3a417456409af1315af37a49 /gcc/fortran
parentdd3b31fbcec5168ff3d5b528fdfc6454d5ff1583 (diff)
downloadgcc-0f0a4367ab5ac7d0dd1fa8eb0acba3ddc063f619.zip
gcc-0f0a4367ab5ac7d0dd1fa8eb0acba3ddc063f619.tar.gz
gcc-0f0a4367ab5ac7d0dd1fa8eb0acba3ddc063f619.tar.bz2
re PR fortran/47565 ([OOP] Segfault with TBP)
2011-02-01 Janus Weil <janus@gcc.gnu.org> PR fortran/47565 * trans-expr.c (gfc_conv_structure): Handle constructors for procedure pointer components with allocatable result. 2011-02-01 Janus Weil <janus@gcc.gnu.org> PR fortran/47565 * gfortran.dg/typebound_call_20.f03: New. From-SVN: r169480
Diffstat (limited to 'gcc/fortran')
-rw-r--r--gcc/fortran/ChangeLog6
-rw-r--r--gcc/fortran/trans-expr.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index e05645d..bb1d89e 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,9 @@
+2011-02-01 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/47565
+ * trans-expr.c (gfc_conv_structure): Handle constructors for procedure
+ pointer components with allocatable result.
+
2011-01-31 Janus Weil <janus@gcc.gnu.org>
PR fortran/47455
diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c
index b5b6d61..57bdb5d 100644
--- a/gcc/fortran/trans-expr.c
+++ b/gcc/fortran/trans-expr.c
@@ -4627,7 +4627,7 @@ gfc_conv_structure (gfc_se * se, gfc_expr * expr, int init)
components. Although the latter have a default initializer
of EXPR_NULL,... by default, the static nullify is not needed
since this is done every time we come into scope. */
- if (!c->expr || cm->attr.allocatable)
+ if (!c->expr || (cm->attr.allocatable && cm->attr.flavor != FL_PROCEDURE))
continue;
if (strcmp (cm->name, "_size") == 0)