su at cs dot ucdavis.edu
2014-06-17 02:00:20 UTC
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61529
Bug ID: 61529
Summary: ICE on valid code at -O3 on x86_64-linux-gnu in
check_probability, at basic-block.h:953
Product: gcc
Version: 4.10.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 at
-O3 on x86_64-linux-gnu in both 32-bit and 64-bit modes.
It is a regression from 4.9.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.10.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-trunk/configure --prefix=/usr/local/gcc-trunk
--enable-languages=c,c++ --disable-werror --enable-multilib
Thread model: posix
gcc version 4.10.0 20140616 (experimental) [trunk revision 211707] (GCC)
$
$ gcc-trunk -O2 small.c; a.out
$ gcc-4.9 -O3 small.c; a.out
$
$ gcc-trunk -O3 small.c
small.c: In function ‘fn1’:
small.c:4:1: internal compiler error: in check_probability, at
basic-block.h:953
fn1 ()
^
0xb905e6 check_probability
../../gcc-trunk/gcc/basic-block.h:953
0xb8dde1 check_probability
../../gcc-trunk/gcc/tree-vect-loop-manip.c:653
0xb8dde1 combine_probabilities
../../gcc-trunk/gcc/basic-block.h:962
0xb8dde1 slpeel_tree_peel_loop_to_edge
../../gcc-trunk/gcc/tree-vect-loop-manip.c:1371
0xb8e154 vect_do_peeling_for_loop_bound(_loop_vec_info*, tree_node*,
tree_node*, unsigned int, bool)
../../gcc-trunk/gcc/tree-vect-loop-manip.c:1761
0xb7f3a7 vect_transform_loop(_loop_vec_info*)
../../gcc-trunk/gcc/tree-vect-loop.c:5852
0xb9c286 vectorize_loops()
../../gcc-trunk/gcc/tree-vectorizer.c:476
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.
$
----------------------------
char a, b, c, d, e, f, g;
void
fn1 ()
{
char h = 0;
lbl:
for (c = 0; c; c = 0)
for (; a;)
for (d = 1; d; d++)
if ((b & ((g > 0) >= h)) ^ 2)
goto lbl;
for (f = 1; f; f++)
e ^= 1;
}
int
main ()
{
fn1 ();
return 0;
}
Bug ID: 61529
Summary: ICE on valid code at -O3 on x86_64-linux-gnu in
check_probability, at basic-block.h:953
Product: gcc
Version: 4.10.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 at
-O3 on x86_64-linux-gnu in both 32-bit and 64-bit modes.
It is a regression from 4.9.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.10.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-trunk/configure --prefix=/usr/local/gcc-trunk
--enable-languages=c,c++ --disable-werror --enable-multilib
Thread model: posix
gcc version 4.10.0 20140616 (experimental) [trunk revision 211707] (GCC)
$
$ gcc-trunk -O2 small.c; a.out
$ gcc-4.9 -O3 small.c; a.out
$
$ gcc-trunk -O3 small.c
small.c: In function ‘fn1’:
small.c:4:1: internal compiler error: in check_probability, at
basic-block.h:953
fn1 ()
^
0xb905e6 check_probability
../../gcc-trunk/gcc/basic-block.h:953
0xb8dde1 check_probability
../../gcc-trunk/gcc/tree-vect-loop-manip.c:653
0xb8dde1 combine_probabilities
../../gcc-trunk/gcc/basic-block.h:962
0xb8dde1 slpeel_tree_peel_loop_to_edge
../../gcc-trunk/gcc/tree-vect-loop-manip.c:1371
0xb8e154 vect_do_peeling_for_loop_bound(_loop_vec_info*, tree_node*,
tree_node*, unsigned int, bool)
../../gcc-trunk/gcc/tree-vect-loop-manip.c:1761
0xb7f3a7 vect_transform_loop(_loop_vec_info*)
../../gcc-trunk/gcc/tree-vect-loop.c:5852
0xb9c286 vectorize_loops()
../../gcc-trunk/gcc/tree-vectorizer.c:476
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.
$
----------------------------
char a, b, c, d, e, f, g;
void
fn1 ()
{
char h = 0;
lbl:
for (c = 0; c; c = 0)
for (; a;)
for (d = 1; d; d++)
if ((b & ((g > 0) >= h)) ^ 2)
goto lbl;
for (f = 1; f; f++)
e ^= 1;
}
int
main ()
{
fn1 ();
return 0;
}