diff options
author | Harald Anlauf <anlauf@gmx.de> | 2021-08-07 20:30:32 +0200 |
---|---|---|
committer | Tobias Burnus <tobias@codesourcery.com> | 2022-03-07 19:37:33 +0100 |
commit | 117c50428fd9b497480f7eed1d499777de9b7da7 (patch) | |
tree | 28067f647c495385e50f7fd6ee783a6c310c4a53 | |
parent | 327e88949123743d00c3cdb0651cebb45465797e (diff) |
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)
-rw-r--r-- | gcc/fortran/primary.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/fortran/primary.c b/gcc/fortran/primary.c index 11e2a555e0a..774e695473a 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 |