This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/71068] [5/6/7 Regression] ICE in check_data_variable(): Bad expression


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71068

--- Comment #2 from kargl at gcc dot gnu.org ---
cat pr71068.diff
Index: resolve.c
===================================================================
--- resolve.c   (revision 236243)
+++ resolve.c   (working copy)
@@ -14495,6 +14495,17 @@ check_data_variable (gfc_data_variable *
   mpz_init_set_si (offset, 0);
   e = var->expr;

+  /* F2008:C565.  */
+  if (flag_coarray == GFC_FCOARRAY_LIB && e->expr_type == EXPR_FUNCTION
+      && e->value.function.isym
+      && (e->value.function.isym->id == GFC_ISYM_CAF_GET
+         || e->value.function.isym->id == GFC_ISYM_CAF_SEND))
+    {
+      gfc_error ("DATA statement object near %L shall not have a coindex",
+                where);
+      return false;
+    }
+
   if (e->expr_type != EXPR_VARIABLE)
     gfc_internal_error ("check_data_variable(): Bad expression");

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]