https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85641
Thomas Koenig <tkoenig at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |tkoenig at gcc dot gnu.org --- Comment #4 from Thomas Koenig <tkoenig at gcc dot gnu.org> --- This looks good: --- frontend-passes.c (Revision 261245) +++ frontend-passes.c (Arbeitskopie) @@ -57,6 +57,8 @@ static bool has_dimen_vector_ref (gfc_expr *); static int matmul_temp_args (gfc_code **, int *,void *data); static int index_interchange (gfc_code **, int*, void *); +static bool is_fe_temp (gfc_expr *e); + #ifdef CHECKING_P static void check_locus (gfc_namespace *); #endif @@ -254,6 +256,9 @@ realloc_string_callback (gfc_code **c, int *walk_s || !expr1->ts.deferred) return 0; + if (is_fe_temp (expr1)) + return 0; + expr2 = gfc_discard_nops (co->expr2); if (expr2->expr_type == EXPR_VARIABLE)