* [Bug middle-end/43057] [LTO] fold check: original tree changed by fold
[not found] <bug-43057-4@http.gcc.gnu.org/bugzilla/>
@ 2010-11-20 14:37 ` d.g.gorbachev at gmail dot com
2010-11-20 16:28 ` ubizjak at gmail dot com
` (4 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: d.g.gorbachev at gmail dot com @ 2010-11-20 14:37 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43057
Dmitry Gorbachev <d.g.gorbachev at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to fail| |4.5.2, 4.6.0
--- Comment #5 from Dmitry Gorbachev <d.g.gorbachev at gmail dot com> 2010-11-20 14:19:44 UTC ---
Still fails with GCC 4.5.2 and 4.6.0.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/43057] [LTO] fold check: original tree changed by fold
[not found] <bug-43057-4@http.gcc.gnu.org/bugzilla/>
2010-11-20 14:37 ` [Bug middle-end/43057] [LTO] fold check: original tree changed by fold d.g.gorbachev at gmail dot com
@ 2010-11-20 16:28 ` ubizjak at gmail dot com
2010-11-22 16:17 ` uros at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: ubizjak at gmail dot com @ 2010-11-20 16:28 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43057
Uros Bizjak <ubizjak at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2010.11.20 16:13:06
Ever Confirmed|0 |1
--- Comment #6 from Uros Bizjak <ubizjak at gmail dot com> 2010-11-20 16:13:06 UTC ---
Following untested patch fixes the failure:
Index: fold-const.c
===================================================================
--- fold-const.c (revision 166974)
+++ fold-const.c (working copy)
@@ -13415,7 +13415,7 @@ fold_ternary_loc (location_t loc, enum t
a COND, which will recurse. In that case, the COND_EXPR
is probably the best choice, so leave it alone. */
&& type == TREE_TYPE (arg0))
- return pedantic_non_lvalue_loc (loc, arg0);
+ return pedantic_non_lvalue_loc (loc, unshare_expr (arg0));
/* Convert A ? 0 : 1 to !A. This prefers the use of NOT_EXPR
over COND_EXPR in cases such as floating point comparisons. */
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/43057] [LTO] fold check: original tree changed by fold
[not found] <bug-43057-4@http.gcc.gnu.org/bugzilla/>
2010-11-20 14:37 ` [Bug middle-end/43057] [LTO] fold check: original tree changed by fold d.g.gorbachev at gmail dot com
2010-11-20 16:28 ` ubizjak at gmail dot com
@ 2010-11-22 16:17 ` uros at gcc dot gnu.org
2010-11-22 18:03 ` uros at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: uros at gcc dot gnu.org @ 2010-11-22 16:17 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43057
--- Comment #7 from uros at gcc dot gnu.org 2010-11-22 16:14:33 UTC ---
Author: uros
Date: Mon Nov 22 16:14:27 2010
New Revision: 167037
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=167037
Log:
PR middle-end/43057
* fold-const.c (pedantic_non_lvalue_loc): Unshare x before
setting location.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/fold-const.c
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/43057] [LTO] fold check: original tree changed by fold
[not found] <bug-43057-4@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2010-11-22 16:17 ` uros at gcc dot gnu.org
@ 2010-11-22 18:03 ` uros at gcc dot gnu.org
2010-11-22 18:22 ` ubizjak at gmail dot com
2010-11-22 20:01 ` d.g.gorbachev at gmail dot com
5 siblings, 0 replies; 8+ messages in thread
From: uros at gcc dot gnu.org @ 2010-11-22 18:03 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43057
--- Comment #8 from uros at gcc dot gnu.org 2010-11-22 18:03:05 UTC ---
Author: uros
Date: Mon Nov 22 18:02:58 2010
New Revision: 167042
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=167042
Log:
PR middle-end/43057
* fold-const.c (pedantic_non_lvalue_loc): Unshare x before
setting location.
Modified:
branches/gcc-4_5-branch/gcc/ChangeLog
branches/gcc-4_5-branch/gcc/fold-const.c
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/43057] [LTO] fold check: original tree changed by fold
[not found] <bug-43057-4@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2010-11-22 18:03 ` uros at gcc dot gnu.org
@ 2010-11-22 18:22 ` ubizjak at gmail dot com
2010-11-22 20:01 ` d.g.gorbachev at gmail dot com
5 siblings, 0 replies; 8+ messages in thread
From: ubizjak at gmail dot com @ 2010-11-22 18:22 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43057
Uros Bizjak <ubizjak at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.5.2
--- Comment #9 from Uros Bizjak <ubizjak at gmail dot com> 2010-11-22 18:19:55 UTC ---
Fixed.
FWIW, following this patch, at least mainline can be bootstrapped with
--enable-checking=all; I didn't bootstrap 4.5 since it takes lots of time.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/43057] [LTO] fold check: original tree changed by fold
[not found] <bug-43057-4@http.gcc.gnu.org/bugzilla/>
` (4 preceding siblings ...)
2010-11-22 18:22 ` ubizjak at gmail dot com
@ 2010-11-22 20:01 ` d.g.gorbachev at gmail dot com
5 siblings, 0 replies; 8+ messages in thread
From: d.g.gorbachev at gmail dot com @ 2010-11-22 20:01 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43057
--- Comment #10 from Dmitry Gorbachev <d.g.gorbachev at gmail dot com> 2010-11-22 19:58:56 UTC ---
*** Bug 43316 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 8+ messages in thread