https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71626
Bug ID: 71626
Summary: ICE at -O1 and above on x86_64-linux-gnu (in
output_constant_pool_2, at varasm.c:3837)
Product: gcc
Version: 7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: chengniansun at gmail dot com
Target Milestone: ---
This is a regression. gcc-4.9 also ICEs.
$: 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 20160622 (experimental) [trunk revision 237712] (GCC)
$:
$: gcc-trunk -O1 small.c
small.c: In function ‘fn’:
small.c:5:16: warning: initialization makes integer from pointer without a cast
[-Wint-conversion]
vllong1 v = {fn};
^~
small.c:5:16: note: (near initialization for ‘v’)
small.c: At top level:
small.c:7:1: internal compiler error: in output_constant_pool_2, at
varasm.c:3837
}
^
0xea3de4 output_constant_pool_2
../../gcc-source-trunk/gcc/varasm.c:3837
0xea3e9d output_constant_pool_1
../../gcc-source-trunk/gcc/varasm.c:3909
0xeb270d output_constant_pool_contents
../../gcc-source-trunk/gcc/varasm.c:4023
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.
$:
$: cat small.c
typedef long llong;
typedef llong vllong1 __attribute__((__vector_size__(sizeof(llong))));
vllong1 fn() {
vllong1 v = {fn};
return v;
}
$: