Summary: | [4.4 Regression] ice in simplify_truth_ops_using_ranges, at tree-vrp.c:6335 | ||
---|---|---|---|
Product: | gcc | Reporter: | John Regehr <regehr> |
Component: | tree-optimization | Assignee: | Jakub Jelinek <jakub> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | bonzini, fang, gcc-bugs, pinskia, rguenth |
Priority: | P3 | Keywords: | ice-on-valid-code |
Version: | unknown | ||
Target Milestone: | 4.4.0 | ||
Host: | i686-pc-linux-gnu | Target: | i686-pc-linux-gnu avr-*-* |
Build: | i686-pc-linux-gnu | Known to work: | |
Known to fail: | Last reconfirmed: | 2008-09-30 12:30:09 |
Description
John Regehr
2008-09-27 18:43:31 UTC
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. |