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.
This commit is contained in:
Harald Anlauf 2021-08-07 20:30:32 +02:00
parent 6866f4819a
commit cd754efa9a

View File

@ -2779,7 +2779,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