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 debug/71549] New: ICE on valid code at -O2 and -O3 with -g enabled in 64-bit mode on x86_64-linux-gnu: in simplify_subreg, at simplify-rtx.c:5952


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

            Bug ID: 71549
           Summary: ICE on valid code at -O2 and -O3 with -g enabled in
                    64-bit mode on x86_64-linux-gnu: in simplify_subreg,
                    at simplify-rtx.c:5952
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
          Assignee: unassigned at gcc dot gnu.org
          Reporter: su at cs dot ucdavis.edu
  Target Milestone: ---

The following code causes an ICE when compiled with the current gcc trunk at
-O2 and -O3 with -g enabled on x86_64-linux-gnu in the 64-bit mode (but not in
the 32-bit mode). 

It is a regression from 6.1.x.


$ gcc-trunk -v
Using built-in specs.
COLLECT_GCC=gcc-trunk
COLLECT_LTO_WRAPPER=/usr/local/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/7.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-source-trunk/configure --enable-languages=c,c++,lto
--prefix=/usr/local/gcc-trunk --disable-bootstrap
Thread model: posix
gcc version 7.0.0 20160615 (experimental) [trunk revision 237485] (GCC) 
$ 
$ gcc-trunk -m64 -Os -g small.c
$ gcc-6.1 -m64 -O2 -g small.c
$ 
$ gcc-trunk -m64 -O2 -g small.c
small.c: In function âmainâ:
small.c:21:1: internal compiler error: in simplify_subreg, at
simplify-rtx.c:5952
 }
 ^
0xba9fab simplify_subreg(machine_mode, rtx_def*, machine_mode, unsigned int)
        ../../gcc-source-trunk/gcc/simplify-rtx.c:5951
0xbaa5c9 simplify_gen_subreg(machine_mode, rtx_def*, machine_mode, unsigned
int)
        ../../gcc-source-trunk/gcc/simplify-rtx.c:6171
0xeab2db vt_expand_loc_callback
        ../../gcc-source-trunk/gcc/var-tracking.c:8435
0x7e9b59 cselib_expand_value_rtx_1
        ../../gcc-source-trunk/gcc/cselib.c:1648
0x7eb53e cselib_expand_value_rtx_cb(rtx_def*, bitmap_head*, int, rtx_def*
(*)(rtx_def*, bitmap_head*, int, void*), void*)
        ../../gcc-source-trunk/gcc/cselib.c:1530
0xeab763 vt_expand_var_loc_chain
        ../../gcc-source-trunk/gcc/var-tracking.c:8330
0xeab763 vt_expand_loc_callback
        ../../gcc-source-trunk/gcc/var-tracking.c:8492
0x7e9a75 cselib_expand_value_rtx_1
        ../../gcc-source-trunk/gcc/cselib.c:1683
0x7eb53e cselib_expand_value_rtx_cb(rtx_def*, bitmap_head*, int, rtx_def*
(*)(rtx_def*, bitmap_head*, int, void*), void*)
        ../../gcc-source-trunk/gcc/cselib.c:1530
0xeab763 vt_expand_var_loc_chain
        ../../gcc-source-trunk/gcc/var-tracking.c:8330
0xeab763 vt_expand_loc_callback
        ../../gcc-source-trunk/gcc/var-tracking.c:8492
0x7eb53e cselib_expand_value_rtx_cb(rtx_def*, bitmap_head*, int, rtx_def*
(*)(rtx_def*, bitmap_head*, int, void*), void*)
        ../../gcc-source-trunk/gcc/cselib.c:1530
0xeab763 vt_expand_var_loc_chain
        ../../gcc-source-trunk/gcc/var-tracking.c:8330
0xeab763 vt_expand_loc_callback
        ../../gcc-source-trunk/gcc/var-tracking.c:8492
0x7e9a75 cselib_expand_value_rtx_1
        ../../gcc-source-trunk/gcc/cselib.c:1683
0x7eb53e cselib_expand_value_rtx_cb(rtx_def*, bitmap_head*, int, rtx_def*
(*)(rtx_def*, bitmap_head*, int, void*), void*)
        ../../gcc-source-trunk/gcc/cselib.c:1530
0xeaa359 vt_expand_var_loc_chain
        ../../gcc-source-trunk/gcc/var-tracking.c:8330
0xeaa359 vt_expand_1pvar
        ../../gcc-source-trunk/gcc/var-tracking.c:8605
0xeaa359 emit_note_insn_var_location(variable**, emit_note_data*)
        ../../gcc-source-trunk/gcc/var-tracking.c:8660
0xead3da traverse_noresize<emit_note_data*, emit_note_insn_var_location>
        ../../gcc-source-trunk/gcc/hash-table.h:950
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
$ 


--------------------------


struct S1
{
  int f0;
  int f1;
  int f2;
  int:4;
} a, b;

void
fn1 (struct S1 p1)
{
  a = p1;
  int c = p1.f0;
}

int
main ()
{
  fn1 (b);
  return 0;
}

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