This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/58539] New: ICE with segfault at -O3 with -g enabled on x86_64-linux-gnu (affecting trunk, 4.8, and 4.7)
- From: "su at cs dot ucdavis.edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 25 Sep 2013 22:48:40 +0000
- Subject: [Bug tree-optimization/58539] New: ICE with segfault at -O3 with -g enabled on x86_64-linux-gnu (affecting trunk, 4.8, and 4.7)
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58539
Bug ID: 58539
Summary: ICE with segfault at -O3 with -g enabled on
x86_64-linux-gnu (affecting trunk, 4.8, and 4.7)
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: su at cs dot ucdavis.edu
The following code causes an ICE when compiled with the current gcc trunk, 4.8,
and 4.7 at -O3 with -g enabled on x86_64-linux in both 32-bit and 64-bit modes.
This is a regression from 4.6.x.
$ gcc-trunk -v
Using built-in specs.
COLLECT_GCC=gcc-trunk
COLLECT_LTO_WRAPPER=/usr/local/gcc-trunk/libexec/gcc/x86_64-unknown-linux-gnu/4.9.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-trunk/configure
--enable-languages=c,c++,objc,obj-c++,fortran,lto --enable-checking=release
--with-gmp=/usr/local/gcc-trunk --with-mpfr=/usr/local/gcc-trunk
--with-mpc=/usr/local/gcc-trunk --with-cloog=/usr/local/gcc-trunk
--prefix=/usr/local/gcc-trunk
Thread model: posix
gcc version 4.9.0 20130925 (experimental) [trunk revision 202882] (GCC)
$
$
$ gcc-trunk -O3 -c small.c
$ gcc-4.6 -O3 -g -c small.c
$
$
$ gcc-trunk -O3 -g -c small.c
small.c: In function âbarâ:
small.c:10:6: internal compiler error: Segmentation fault
void bar ()
^
0x8109ef crash_signal
../../gcc-trunk/gcc/toplev.c:335
0x4ced0d get_use_from_ptr
../../gcc-trunk/gcc/tree-flow-inline.h:370
0x4ced0d link_use_stmts_after
../../gcc-trunk/gcc/tree-flow-inline.h:982
0x4ced0d first_imm_use_stmt
../../gcc-trunk/gcc/tree-flow-inline.h:1034
0x95c6a0 vect_create_epilog_for_reduction
../../gcc-trunk/gcc/tree-vect-loop.c:4566
0x95c6a0 vectorizable_reduction(gimple_statement_d*, gimple_stmt_iterator_d*,
gimple_statement_d**, _slp_tree*)
../../gcc-trunk/gcc/tree-vect-loop.c:5281
0x94f584 vect_transform_stmt(gimple_statement_d*, gimple_stmt_iterator_d*,
bool*, _slp_tree*, _slp_instance*)
../../gcc-trunk/gcc/tree-vect-stmts.c:5988
0x953b00 vect_transform_loop(_loop_vec_info*)
../../gcc-trunk/gcc/tree-vect-loop.c:5859
0x96c457 vectorize_loops()
../../gcc-trunk/gcc/tree-vectorizer.c:367
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.
$
$
$ gcc-4.8 -O3 -g -c small.c
small.c: In function âbarâ:
small.c:10:6: internal compiler error: Segmentation fault
void bar ()
^
0x7b925f crash_signal
../../gcc-4.8.1/gcc/toplev.c:332
0x8e1687 get_use_from_ptr
../../gcc-4.8.1/gcc/tree-flow-inline.h:370
0x8e1687 link_use_stmts_after
../../gcc-4.8.1/gcc/tree-flow-inline.h:982
0x8e1687 first_imm_use_stmt
../../gcc-4.8.1/gcc/tree-flow-inline.h:1034
0x8ecc18 vect_create_epilog_for_reduction
../../gcc-4.8.1/gcc/tree-vect-loop.c:4481
0x8ecc18 vectorizable_reduction(gimple_statement_d*, gimple_stmt_iterator*,
gimple_statement_d**, _slp_tree*)
../../gcc-4.8.1/gcc/tree-vect-loop.c:5196
0x8e1154 vect_transform_stmt(gimple_statement_d*, gimple_stmt_iterator*, bool*,
_slp_tree*, _slp_instance*)
../../gcc-4.8.1/gcc/tree-vect-stmts.c:5808
0x8e380f vect_transform_loop(_loop_vec_info*)
../../gcc-4.8.1/gcc/tree-vect-loop.c:5723
0x8faaea vectorize_loops()
../../gcc-4.8.1/gcc/tree-vectorizer.c:123
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.
$
$
$ gcc-4.7 -O3 -g -c small.c
small.c: In function âbarâ:
small.c:10:6: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
$
------------------------------------
int a, b;
extern void baz (int);
int foo (int p)
{
return p ? p : 1;
}
void bar ()
{
int *c = &a, *d = &a;
for (b = 0; b < 12; b++)
*d |= 1;
foo (*c);
baz (*c && 1);
}