Commit 1821bcfc by Paul Thomas

re PR fortran/43039 ([lto/-fwhole-file] fortran-dev - ICE in…

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
parent b1aa0655
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.
2010-03-18 Shujing Zhao <pearly.zhao@oracle.com> 2010-03-18 Shujing Zhao <pearly.zhao@oracle.com>
* lang.opt (-ffixed-line-length-, ffree-line-length-): Remove * lang.opt (-ffixed-line-length-, ffree-line-length-): Remove
......
...@@ -1851,12 +1851,13 @@ resolve_global_procedure (gfc_symbol *sym, locus *where, ...@@ -1851,12 +1851,13 @@ resolve_global_procedure (gfc_symbol *sym, locus *where,
/* Non-assumed length character functions. */ /* Non-assumed length character functions. */
if (sym->attr.function && sym->ts.type == BT_CHARACTER if (sym->attr.function && sym->ts.type == BT_CHARACTER
&& gsym->ns->proc_name->ts.u.cl->length != NULL) && gsym->ns->proc_name->ts.u.cl != NULL
&& gsym->ns->proc_name->ts.u.cl->length != NULL)
{ {
gfc_charlen *cl = sym->ts.u.cl; gfc_charlen *cl = sym->ts.u.cl;
if (!sym->attr.entry_master && sym->attr.if_source == IFSRC_UNKNOWN if (!sym->attr.entry_master && sym->attr.if_source == IFSRC_UNKNOWN
&& cl && cl->length && cl->length->expr_type != EXPR_CONSTANT) && cl && cl->length && cl->length->expr_type != EXPR_CONSTANT)
{ {
gfc_error ("Nonconstant character-length function '%s' at %L " gfc_error ("Nonconstant character-length function '%s' at %L "
"must have an explicit interface", sym->name, "must have an explicit interface", sym->name,
......
...@@ -507,6 +507,9 @@ conv_parent_component_references (gfc_se * se, gfc_ref * ref) ...@@ -507,6 +507,9 @@ conv_parent_component_references (gfc_se * se, gfc_ref * ref)
parent.u.c.sym = dt; parent.u.c.sym = dt;
parent.u.c.component = dt->components; 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.extension && dt->components)
{ {
if (dt->attr.is_class) if (dt->attr.is_class)
...@@ -4454,6 +4457,8 @@ gfc_conv_structure (gfc_se * se, gfc_expr * expr, int init) ...@@ -4454,6 +4457,8 @@ gfc_conv_structure (gfc_se * se, gfc_expr * expr, int init)
{ {
gfc_component *data; gfc_component *data;
data = gfc_find_component (cm->ts.u.derived, "$data", true, true); 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, val = gfc_conv_initializer (c->expr, &cm->ts,
TREE_TYPE (data->backend_decl), TREE_TYPE (data->backend_decl),
data->attr.dimension, data->attr.dimension,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment