https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82314
anlauf at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |anlauf at gcc dot gnu.org --- Comment #6 from anlauf at gcc dot gnu.org --- (In reply to G. Steinmetz from comment #5) > Also related : The ICEs in comment#5 are fixed by diff --git a/gcc/fortran/check.c b/gcc/fortran/check.c index de9a45fe4f9..57c7eb8e1f0 100644 --- a/gcc/fortran/check.c +++ b/gcc/fortran/check.c @@ -4577,7 +4577,8 @@ gfc_check_rank (gfc_expr *a) if (a->expr_type == EXPR_FUNCTION) is_variable = a->value.function.esym ? a->value.function.esym->result->attr.pointer - : a->symtree->n.sym->result->attr.pointer; + : (a->symtree->n.sym->result + && a->symtree->n.sym->result->attr.pointer); if (a->expr_type == EXPR_OP || a->expr_type == EXPR_NULL giving an (invalid) error message: 3 | print *, rank(b) | 1 Error: The argument of the RANK intrinsic at (1) must be a data object Therefore *not* related. The ICE from comment#0 remains.