From: Harald Anlauf Date: Sat, 7 Aug 2021 18:30:32 +0000 (+0200) Subject: Fortran: ICE with automatic character object, save, and various options X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=117c50428fd9b497480f7eed1d499777de9b7da7;p=thirdparty%2Fgcc.git Fortran: ICE with automatic character object, save, and various options gcc/fortran/ChangeLog: PR fortran/68568 * primary.c (gfc_expr_attr): Variable attribute can only be inquired when symtree is non-NULL. (cherry picked from commit cd754efa9a5349c693919046b8be074395ea114e) --- diff --git a/gcc/fortran/primary.c b/gcc/fortran/primary.c index 11e2a555e0ae..774e695473a9 100644 --- a/gcc/fortran/primary.c +++ b/gcc/fortran/primary.c @@ -2788,7 +2788,7 @@ gfc_expr_attr (gfc_expr *e) && e->value.function.isym->transformational && e->ts.type == BT_CLASS) attr = CLASS_DATA (e)->attr; - else + else if (e->symtree) attr = gfc_variable_attr (e, NULL); /* TODO: NULL() returns pointers. May have to take care of this