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

            Bug ID: 77959
           Summary: ICE in ix86_decompose_address, at i386/i386.c:14954
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gerhard.steinmetz.fort...@t-online.de
  Target Milestone: ---

Invalid code with ICE down to at least 4.8, at -Os, -O1 or higher.
No ICE with version 5.4.1.


$ cat z1.f90
program p
   interface
      subroutine s(x)
         real :: x
      end
   end interface
   call s(1.0)
end
subroutine s(x)
   complex :: x
   x = x + 1
end


$ gfortran-7-20161009 -O2 z1.f90
z1.f90:3:18:

       subroutine s(x)
                  1
Warning: Interface mismatch in global procedure 's' at (1): Type mismatch in
argument 'x' (REAL(4)/COMPLEX(4))
z1.f90:11:0:

    x = x + 1

internal compiler error: Segmentation fault
0xc2a7cf crash_signal
        ../../gcc/toplev.c:337
0xf69ea4 ix86_decompose_address(rtx_def*, ix86_address*)
        ../../gcc/config/i386/i386.c:14954
0xf6bd9b ix86_legitimate_address_p
        ../../gcc/config/i386/i386.c:15668
0xb8b07e memory_address_addr_space_p(machine_mode, rtx_def*, unsigned char)
        ../../gcc/recog.c:1336
0x8df897 adjust_address_1(rtx_def*, machine_mode, long, int, int, int, long)
        ../../gcc/emit-rtl.c:2221
0x91e9b1 store_field
        ../../gcc/expr.c:6938
0x91a7b7 expand_assignment(tree_node*, tree_node*, bool)
        ../../gcc/expr.c:5167
0x8083e6 expand_gimple_stmt_1
        ../../gcc/cfgexpand.c:3649
0x8083e6 expand_gimple_stmt
        ../../gcc/cfgexpand.c:3745
0x80a80e expand_gimple_basic_block
        ../../gcc/cfgexpand.c:5752
0x810996 execute
        ../../gcc/cfgexpand.c:6363

Reply via email to