[Bug fortran/92898] [9/10 Regression] ICE in gfc_check_is_contiguous, at fortran/check.c:7157
anlauf at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Dec 10 21:31:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92898
--- Comment #2 from anlauf at gcc dot gnu.org ---
The code added in r276272 checks for closely related invalid code.
The following patch might fix the ICE:
Index: gcc/fortran/check.c
===================================================================
--- gcc/fortran/check.c (Revision 279183)
+++ gcc/fortran/check.c (Arbeitskopie)
@@ -7154,7 +7154,9 @@ bool
gfc_check_is_contiguous (gfc_expr *array)
{
if (array->expr_type == EXPR_NULL
- && array->symtree->n.sym->attr.pointer == 1)
+ && (!array->symtree ||
+ (array->symtree->n.sym &&
+ array->symtree->n.sym->attr.pointer == 1)))
{
gfc_error ("Actual argument at %L of %qs intrinsic shall be an "
"associated pointer", &array->where, gfc_current_intrinsic);
More information about the Gcc-bugs
mailing list