[Bug fortran/93581] New: [9/10 Regression] ICE in gfc_get_dataptr_offset, at fortran/trans-array.c:6951

gscfq@t-online.de gcc-bugzilla@gcc.gnu.org
Tue Feb 4 18:08:00 GMT 2020


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

            Bug ID: 93581
           Summary: [9/10 Regression] ICE in gfc_get_dataptr_offset, at
                    fortran/trans-array.c:6951
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gscfq@t-online.de
  Target Milestone: ---

Changed between 20181028 (rejected) and 20181104 (ICE):
(scalar case z0 works)


$ cat z0.f90
program p
   complex, target :: z = (1.0, 2.0)
   real, pointer :: r
   r => z%re
   print *, r
   r => z%im
   print *, r
end


$ gfortran-10-20200105 z0.f90 && ./a.out
   1.00000000
   2.00000000


$ cat z1.f90
program p
   complex, target :: z(2) = (1.0, 2.0)
   real, pointer :: r(:)
   r => z%re
   print *, r
end


$ gfortran-10-20200202 -c z1.f90
z1.f90:4:0:

    4 |    r => z%re
      |
internal compiler error: in gfc_get_dataptr_offset, at
fortran/trans-array.c:6951
0x703c04 gfc_get_dataptr_offset(stmtblock_t*, tree_node*, tree_node*,
tree_node*, bool, gfc_expr*)
        ../../gcc/fortran/trans-array.c:6951
0x708ac1 gfc_conv_expr_descriptor(gfc_se*, gfc_expr*)
        ../../gcc/fortran/trans-array.c:7746
0x734f43 gfc_trans_pointer_assignment(gfc_expr*, gfc_expr*)
        ../../gcc/fortran/trans-expr.c:9293
0x6f5eb7 trans_code
        ../../gcc/fortran/trans.c:1872
0x71f504 gfc_generate_function_code(gfc_namespace*)
        ../../gcc/fortran/trans-decl.c:6835
0x6a83a6 translate_all_program_units
        ../../gcc/fortran/parse.c:6306
0x6a83a6 gfc_parse_file()
        ../../gcc/fortran/parse.c:6545
0x6f295f gfc_be_parse_file
        ../../gcc/fortran/f95-lang.c:210


More information about the Gcc-bugs mailing list