* [Bug tree-optimization/50729] Silent code gen fault: Value range propagation seems to propagate values across narrowing/widening
2011-10-14 13:40 [Bug tree-optimization/50729] New: Silent code gen fault: Value range propagation seems to propagate values across narrowing/widening mgretton at sourceware dot org
@ 2011-10-14 13:41 ` mgretton at sourceware dot org
2011-10-14 13:49 ` mgretton at sourceware dot org
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: mgretton at sourceware dot org @ 2011-10-14 13:41 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50729
--- Comment #1 from Matthew Gretton-Dann <mgretton at sourceware dot org> 2011-10-14 13:40:14 UTC ---
Created attachment 25498
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25498
Cutdown pre-processed non-executable testcase
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/50729] Silent code gen fault: Value range propagation seems to propagate values across narrowing/widening
2011-10-14 13:40 [Bug tree-optimization/50729] New: Silent code gen fault: Value range propagation seems to propagate values across narrowing/widening mgretton at sourceware dot org
2011-10-14 13:41 ` [Bug tree-optimization/50729] " mgretton at sourceware dot org
@ 2011-10-14 13:49 ` mgretton at sourceware dot org
2011-10-14 13:50 ` mgretton at sourceware dot org
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: mgretton at sourceware dot org @ 2011-10-14 13:49 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50729
--- Comment #2 from Matthew Gretton-Dann <mgretton at sourceware dot org> 2011-10-14 13:49:15 UTC ---
Created attachment 25499
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25499
Tree just before VRP
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/50729] Silent code gen fault: Value range propagation seems to propagate values across narrowing/widening
2011-10-14 13:40 [Bug tree-optimization/50729] New: Silent code gen fault: Value range propagation seems to propagate values across narrowing/widening mgretton at sourceware dot org
2011-10-14 13:41 ` [Bug tree-optimization/50729] " mgretton at sourceware dot org
2011-10-14 13:49 ` mgretton at sourceware dot org
@ 2011-10-14 13:50 ` mgretton at sourceware dot org
2011-10-14 14:04 ` [Bug tree-optimization/50729] [4.7 Regression] " rguenth at gcc dot gnu.org
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: mgretton at sourceware dot org @ 2011-10-14 13:50 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50729
--- Comment #3 from Matthew Gretton-Dann <mgretton at sourceware dot org> 2011-10-14 13:49:50 UTC ---
Created attachment 25500
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25500
VRP1 Analysis and resultant tree
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/50729] [4.7 Regression] Silent code gen fault: Value range propagation seems to propagate values across narrowing/widening
2011-10-14 13:40 [Bug tree-optimization/50729] New: Silent code gen fault: Value range propagation seems to propagate values across narrowing/widening mgretton at sourceware dot org
` (2 preceding siblings ...)
2011-10-14 13:50 ` mgretton at sourceware dot org
@ 2011-10-14 14:04 ` rguenth at gcc dot gnu.org
2011-10-17 12:24 ` rguenth at gcc dot gnu.org
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-10-14 14:04 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50729
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2011-10-14
Known to work| |4.6.2
AssignedTo|unassigned at gcc dot |rguenth at gcc dot gnu.org
|gnu.org |
Target Milestone|--- |4.7.0
Summary|Silent code gen fault: |[4.7 Regression] Silent
|Value range propagation |code gen fault: Value range
|seems to propagate values |propagation seems to
|across narrowing/widening |propagate values across
| |narrowing/widening
Ever Confirmed|0 |1
--- Comment #4 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-10-14 14:04:26 UTC ---
Confirmed, mine.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/50729] [4.7 Regression] Silent code gen fault: Value range propagation seems to propagate values across narrowing/widening
2011-10-14 13:40 [Bug tree-optimization/50729] New: Silent code gen fault: Value range propagation seems to propagate values across narrowing/widening mgretton at sourceware dot org
` (3 preceding siblings ...)
2011-10-14 14:04 ` [Bug tree-optimization/50729] [4.7 Regression] " rguenth at gcc dot gnu.org
@ 2011-10-17 12:24 ` rguenth at gcc dot gnu.org
2011-10-17 12:57 ` rguenth at gcc dot gnu.org
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-10-17 12:24 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50729
--- Comment #5 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-10-17 12:23:04 UTC ---
Author: rguenth
Date: Mon Oct 17 12:22:54 2011
New Revision: 180087
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=180087
Log:
2011-10-17 Richard Guenther <rguenther@suse.de>
PR tree-optimization/50729
* tree-vrp.c (extract_range_from_unary_expr_1): Remove
redundant test.
(simplify_conversion_using_ranges): Properly test the
intermediate result.
* gcc.dg/torture/pr50729.c: New testcase.
Added:
trunk/gcc/testsuite/gcc.dg/torture/pr50729.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-vrp.c
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/50729] [4.7 Regression] Silent code gen fault: Value range propagation seems to propagate values across narrowing/widening
2011-10-14 13:40 [Bug tree-optimization/50729] New: Silent code gen fault: Value range propagation seems to propagate values across narrowing/widening mgretton at sourceware dot org
` (4 preceding siblings ...)
2011-10-17 12:24 ` rguenth at gcc dot gnu.org
@ 2011-10-17 12:57 ` rguenth at gcc dot gnu.org
2011-11-18 23:24 ` amylaar at gcc dot gnu.org
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-10-17 12:57 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50729
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #6 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-10-17 12:57:18 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/50729] [4.7 Regression] Silent code gen fault: Value range propagation seems to propagate values across narrowing/widening
2011-10-14 13:40 [Bug tree-optimization/50729] New: Silent code gen fault: Value range propagation seems to propagate values across narrowing/widening mgretton at sourceware dot org
` (5 preceding siblings ...)
2011-10-17 12:57 ` rguenth at gcc dot gnu.org
@ 2011-11-18 23:24 ` amylaar at gcc dot gnu.org
2011-11-19 2:05 ` amylaar at gcc dot gnu.org
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: amylaar at gcc dot gnu.org @ 2011-11-18 23:24 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50729
Jorn Wolfgang Rennecke <amylaar at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
CC| |amylaar at gcc dot gnu.org
Resolution|FIXED |
--- Comment #7 from Jorn Wolfgang Rennecke <amylaar at gcc dot gnu.org> 2011-11-18 23:13:49 UTC ---
When innerop is unsigned, and middleop is signed, the value computed
for middlemax is bogus.
The original test would catch that condition, the new test doesn't.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/50729] [4.7 Regression] Silent code gen fault: Value range propagation seems to propagate values across narrowing/widening
2011-10-14 13:40 [Bug tree-optimization/50729] New: Silent code gen fault: Value range propagation seems to propagate values across narrowing/widening mgretton at sourceware dot org
` (6 preceding siblings ...)
2011-11-18 23:24 ` amylaar at gcc dot gnu.org
@ 2011-11-19 2:05 ` amylaar at gcc dot gnu.org
2011-11-19 4:25 ` amylaar at gcc dot gnu.org
2011-12-06 12:05 ` rguenth at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: amylaar at gcc dot gnu.org @ 2011-11-19 2:05 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50729
--- Comment #8 from Jorn Wolfgang Rennecke <amylaar at gcc dot gnu.org> 2011-11-19 00:03:56 UTC ---
More specifically, the problem appears when innerop has a different signedness
than middleop, and the value range of middleop is such that the topmost bit
of a double_int is used.
E.g. the full value range of a 64 bit long long with 32 bit HOST_WIDE_INT,
or a 128 bit integer type with a 64 bit HOST_WIDE_INT.
OTOH both the old and the new test will reject some simplifications that
would be OK when considering a narrow finaltype, and/or same-size
signed/unsigned conversion.
The basic problem is that when a signedness change happens, we are no longer
necessarily considering a single range, but possibly two.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/50729] [4.7 Regression] Silent code gen fault: Value range propagation seems to propagate values across narrowing/widening
2011-10-14 13:40 [Bug tree-optimization/50729] New: Silent code gen fault: Value range propagation seems to propagate values across narrowing/widening mgretton at sourceware dot org
` (7 preceding siblings ...)
2011-11-19 2:05 ` amylaar at gcc dot gnu.org
@ 2011-11-19 4:25 ` amylaar at gcc dot gnu.org
2011-12-06 12:05 ` rguenth at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: amylaar at gcc dot gnu.org @ 2011-11-19 4:25 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50729
--- Comment #9 from Jorn Wolfgang Rennecke <amylaar at gcc dot gnu.org> 2011-11-19 02:06:36 UTC ---
I've added a patch attachment to PR50802 that replaces the test.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/50729] [4.7 Regression] Silent code gen fault: Value range propagation seems to propagate values across narrowing/widening
2011-10-14 13:40 [Bug tree-optimization/50729] New: Silent code gen fault: Value range propagation seems to propagate values across narrowing/widening mgretton at sourceware dot org
` (8 preceding siblings ...)
2011-11-19 4:25 ` amylaar at gcc dot gnu.org
@ 2011-12-06 12:05 ` rguenth at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-12-06 12:05 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50729
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution| |FIXED
--- Comment #10 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-12-06 12:04:45 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 11+ messages in thread