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

kargl at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kargl at gcc dot gnu.org

--- Comment #2 from kargl at gcc dot gnu.org ---
The problem arises in interface.c at 1210.

      if (s1->as->type == AS_EXPLICIT)
    for (i = 0; i < s1->as->rank + s1->as->corank; i++)
      {
        shape1 = gfc_subtract (gfc_copy_expr (s1->as->upper[i]),
                  gfc_copy_expr (s1->as->lower[i]));
        shape2 = gfc_subtract (gfc_copy_expr (s2->as->upper[i]),
                  gfc_copy_expr (s2->as->lower[i]));


(gdb) print *s1->as
$4 = {rank = 0, corank = 1, type = AS_EXPLICIT, cotype = AS_EXPLICIT, 
  lower = {0x20348b240, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, upper = {0x0, 0x0, 
    0x0, 0x0, 0x0, 0x0, 0x0}, cray_pointee = false, cp_was_assumed = false}
(gdb) print *s2->as
$5 = {rank = 0, corank = 1, type = AS_EXPLICIT, cotype = AS_EXPLICIT, 
  lower = {0x20348b540, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, upper = {0x0, 0x0, 
    0x0, 0x0, 0x0, 0x0, 0x0}, cray_pointee = false, cp_was_assumed = false}

Both s1->as->upper[0] and s2->as->upper[0] are NULL.  gfc_copy_expr()
returns NULL, so the code is gfc_subtract(NULL, 0x20348b240).  Well,
gfc_subtract isn't expecting a NULL.

Reply via email to