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 rtl-optimization/70174] New: ICE at -O1 and above on x86_64-linux-gnu in gen_lowpart_general, at rtlhooks.c:63


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

            Bug ID: 70174
           Summary: ICE at -O1 and above on x86_64-linux-gnu in
                    gen_lowpart_general, at rtlhooks.c:63
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: su at cs dot ucdavis.edu
  Target Milestone: ---

The following (invalid) code causes an ICE when compiled with the current gcc
trunk on x86_64-linux-gnu at -O1 and above in both 32-bit and 64-bit modes.

This is a regression from 5.3.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/6.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 6.0.0 20160310 (experimental) [trunk revision 234104] (GCC)
$
$ gcc-trunk -O0 -c small.c
small.c: In function âfn1â:
small.c:9:8: warning: assignment makes integer from pointer without a cast
[-Wint-conversion]
   a.f0 = fn1;
        ^
$ gcc-5.3 -O1 -c small.c
small.c: In function âfn1â:
small.c:9:8: warning: assignment makes integer from pointer without a cast
[-Wint-conversion]
   a.f0 = fn1;
        ^
$
$ gcc-trunk -O1 -c small.c
small.c: In function âfn1â:
small.c:9:8: warning: assignment makes integer from pointer without a cast
[-Wint-conversion]
   a.f0 = fn1;
        ^
small.c:9:8: internal compiler error: in gen_lowpart_general, at rtlhooks.c:63
   a.f0 = fn1;
   ~~~~~^~~~~
0xb0aea3 gen_lowpart_general(machine_mode, rtx_def*)
        ../../gcc-source-trunk/gcc/rtlhooks.c:63
0x82c4a3 store_bit_field_using_insv
        ../../gcc-source-trunk/gcc/expmed.c:678
0x832cf7 store_bit_field_1
        ../../gcc-source-trunk/gcc/expmed.c:991
0x832daf store_bit_field_1
        ../../gcc-source-trunk/gcc/expmed.c:1014
0x832f6b store_bit_field(rtx_def*, unsigned long, unsigned long, unsigned long,
unsigned long, machine_mode, rtx_def*, bool)
        ../../gcc-source-trunk/gcc/expmed.c:1113
0x854758 store_field
        ../../gcc-source-trunk/gcc/expr.c:6784
0x850203 expand_assignment(tree_node*, tree_node*, bool)
        ../../gcc-source-trunk/gcc/expr.c:5021
0x73df5c expand_gimple_stmt_1
        ../../gcc-source-trunk/gcc/cfgexpand.c:3618
0x73df5c expand_gimple_stmt
        ../../gcc-source-trunk/gcc/cfgexpand.c:3714
0x740f43 expand_gimple_basic_block
        ../../gcc-source-trunk/gcc/cfgexpand.c:5720
0x745ff6 execute
        ../../gcc-source-trunk/gcc/cfgexpand.c:6335
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
{ 
  int f0:4;
} a;

void
fn1 ()
{ 
  a.f0 = fn1;
}

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