https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103504
--- Comment #2 from anlauf at gcc dot gnu.org --- The ICE is avoided by: diff --git a/gcc/fortran/interface.cc b/gcc/fortran/interface.cc index 7ed6e13711f..f8a1720ea7e 100644 --- a/gcc/fortran/interface.cc +++ b/gcc/fortran/interface.cc @@ -2809,7 +2809,9 @@ get_sym_storage_size (gfc_symbol *sym) for (i = 0; i < sym->as->rank; i++) { if (sym->as->upper[i]->expr_type != EXPR_CONSTANT - || sym->as->lower[i]->expr_type != EXPR_CONSTANT) + || sym->as->lower[i]->expr_type != EXPR_CONSTANT + || sym->as->upper[i]->ts.type != BT_INTEGER + || sym->as->lower[i]->ts.type != BT_INTEGER) return 0; elements *= mpz_get_si (sym->as->upper[i]->value.integer)