------- Comment #19 from jvdelisle at gcc dot gnu dot org 2009-12-05 17:01 ------- Try this patch:
Index: data.c =================================================================== --- data.c (revision 155006) +++ data.c (working copy) @@ -497,7 +497,13 @@ gfc_assign_data_value_range (gfc_expr *lvalue, gfc expr->expr_type = EXPR_ARRAY; expr->rank = ref->u.ar.as->rank; } - else + else if (expr->expr_type != EXPR_ARRAY) + { + gfc_error ("Duplicate initialization at %L", + &expr->where);; + return; + } + gcc_assert (expr->expr_type == EXPR_ARRAY); if (ref->u.ar.type == AR_ELEMENT) @@ -558,8 +564,12 @@ gfc_assign_data_value_range (gfc_expr *lvalue, gfc pred->next = con; } } - else - gcc_assert (ref->next != NULL); + else if (ref->next == NULL) + { + gfc_error ("Duplicate initialization at %L", + &rvalue->where);; + return; + } break; case REF_COMPONENT: -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24978