]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fortran: ICE with automatic character object, save, and various options
authorHarald Anlauf <anlauf@gmx.de>
Sat, 7 Aug 2021 18:30:32 +0000 (20:30 +0200)
committerTobias Burnus <tobias@codesourcery.com>
Mon, 7 Mar 2022 18:37:33 +0000 (19:37 +0100)
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)

gcc/fortran/primary.c

index 11e2a555e0aea27166ac55e24c4f5dadc81841e0..774e695473a9f90dd989c744f3a3f424a2a85869 100644 (file)
@@ -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