Seen using r140721. regehr@john-home:~/volatile/tmp45$ current-gcc -O3 small.c small.c: In function ‘func_91’: small.c:3: internal compiler error: in simplify_truth_ops_using_ranges, at tree-vrp.c:6335 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. regehr@john-home:~/volatile/tmp45$ cat small.c int func_99 (signed char p_100); int func_91 (int p_93) { func_99 (1 >= p_93); } int func_99 (signed char p_100) { int l_102 = 0x8F9F05BBL; int l_108; p_100 = p_100 + (p_100 != l_102 * l_102) & -1; if (p_100) { if (func_50 (1, 1, func_50 (func_28 (1), l_108, 1, 1), 1)) { } } } regehr@john-home:~/volatile/tmp45$ current-gcc -v Using built-in specs. Target: i686-pc-linux-gnu Configured with: ../configure --program-prefix=current- --enable-languages=c,c++ --prefix=/home/regehr : (reconfigured) ../configure --program-prefix=current- --enable-languages=c,c++ --prefix=/home/regehr : (reconfigured) ../configure --program-prefix=current- --enable-languages=c,c++ --prefix=/home/regehr : (reconfigured) ../configure --program-prefix=current- --enable-languages=c,c++ --prefix=/home/regehr : (reconfigured) ../configure --program-prefix=current- --prefix=/home/regehr --enable-languages=c,c++ --no-create --no-recursion : (reconfigured) ../configure --program-prefix=current- --prefix=/home/regehr --enable-languages=c,c++ --no-create --no-recursion : (reconfigured) ../configure --program-prefix=current- --prefix=/home/regehr --enable-languages=c,c++ --no-create --no-recursion : (reconfigured) ../configure --program-prefix=current- --prefix=/home/regehr --enable-languages=c,c++ --no-create --no-recursion : (reconfigured) ../configure --program-prefix=current- --prefix=/home/regehr --enable-languages=c,c++ --no-create --no-recursion : (reconfigured) ../configure --program-prefix=current- --prefix=/home/regehr --enable-languages=c,c++ --no-create --no-recursion : (reconfigured) ../configure --program-prefix=current- --prefix=/home/regehr --enable-languages=c,c++ --no-create --no-recursion Thread model: posix gcc version 4.4.0 20080927 (experimental) (GCC)
Reduced testcase: int func_99 (int p_100) { p_100 = 1 >= p_100; int l_102 = -1885403717; int l_108; p_100 = p_100 + (p_100 != l_102 * l_102); if (p_100) func_50 (); } --- CUT --- I think this comes down to TREE_OVERFLOW being set.
Subject: Bug 37663 Author: jakub Date: Tue Sep 30 17:00:49 2008 New Revision: 140792 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=140792 Log: PR tree-optimization/37662 PR tree-optimization/37663 * tree-vrp.c (simplify_truth_ops_using_ranges): Don't call get_value_range with non-SSA_NAME. Don't assert operands have been folded, instead just bail out. * gcc.c-torture/compile/pr37662.c: New test. * gcc.dg/pr37663.c: New test. Added: trunk/gcc/testsuite/gcc.c-torture/compile/pr37662.c trunk/gcc/testsuite/gcc.dg/pr37663.c Modified: trunk/gcc/ChangeLog trunk/gcc/testsuite/ChangeLog trunk/gcc/tree-vrp.c
Fixed.
Reopening bug. New test case gcc.dg/pr37663.c fails for AVR with: /usr/local/avrdev/gcc/gcc/gcc/testsuite/gcc.dg/pr37663.c: In function 'foo': /usr/local/avrdev/gcc/gcc/gcc/testsuite/gcc.dg/pr37663.c:11: warning: overflow in implicit constant conversion Line 11: int y = -1885403717; This test case assumes that an int is 32 bits. An int is 16 bits on AVR.
Subject: Bug 37663 Author: jakub Date: Tue Oct 28 20:06:08 2008 New Revision: 141414 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=141414 Log: PR tree-optimization/37663 * gcc.dg/pr37663.c: Require int32plus. Modified: trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/gcc.dg/pr37663.c
Next time, please don't reopen the original PR. Whether the test fails on avr or not doesn't have anything to do with the fact that the original bug has been fixed. IMHO either open a new PR and link it to the original PR, or (preferrably) just submit a patch to gcc-patches to modify the testcase.