aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/trans-expr.c
diff options
context:
space:
mode:
authorPaul Thomas <pault@gcc.gnu.org>2010-03-18 21:23:35 +0000
committerPaul Thomas <pault@gcc.gnu.org>2010-03-18 21:23:35 +0000
commit1821bcfc49276dee748251bdefbb2040dd718954 (patch)
tree4b9aeac998ac3c0bdece79da7774cc9032321be8 /gcc/fortran/trans-expr.c
parentb1aa06558404f699aac25f84835dc04b16f437ea (diff)
downloadgcc-1821bcfc49276dee748251bdefbb2040dd718954.zip
gcc-1821bcfc49276dee748251bdefbb2040dd718954.tar.gz
gcc-1821bcfc49276dee748251bdefbb2040dd718954.tar.bz2
re PR fortran/43039 ([lto/-fwhole-file] fortran-dev - ICE in gfc_conv_component_ref dynamic_dispatch_5.f03)
2010-03-18 Paul Thomas <pault@gcc.gnu.org> PR fortran/43039 * trans-expr.c (conv_parent_component_references): Ensure that 'dt' has a backend_decl. PR fortran/43043 * trans-expr.c (gfc_conv_structure): Ensure that the derived type has a backend_decl. PR fortran/43044 * resolve.c (resolve_global_procedure): Check that the 'cl' structure is not NULL. From-SVN: r157552
Diffstat (limited to 'gcc/fortran/trans-expr.c')
-rw-r--r--gcc/fortran/trans-expr.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c
index abc2a24..b9ea557 100644
--- a/gcc/fortran/trans-expr.c
+++ b/gcc/fortran/trans-expr.c
@@ -507,6 +507,9 @@ conv_parent_component_references (gfc_se * se, gfc_ref * ref)
parent.u.c.sym = dt;
parent.u.c.component = dt->components;
+ if (dt->backend_decl == NULL)
+ gfc_get_derived_type (dt);
+
if (dt->attr.extension && dt->components)
{
if (dt->attr.is_class)
@@ -4454,6 +4457,8 @@ gfc_conv_structure (gfc_se * se, gfc_expr * expr, int init)
{
gfc_component *data;
data = gfc_find_component (cm->ts.u.derived, "$data", true, true);
+ if (!data->backend_decl)
+ gfc_get_derived_type (cm->ts.u.derived);
val = gfc_conv_initializer (c->expr, &cm->ts,
TREE_TYPE (data->backend_decl),
data->attr.dimension,