public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [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

* [Bug middle-end/43057] [LTO] fold check: original tree changed by fold
  2010-02-13 14:27 [Bug lto/43057] New: " d dot g dot gorbachev at gmail dot com
  2010-02-27 14:02 ` [Bug middle-end/43057] " zsojka at seznam dot cz
@ 2010-03-10  0:17 ` d dot g dot gorbachev at gmail dot com
  1 sibling, 0 replies; 8+ messages in thread
From: d dot g dot gorbachev at gmail dot com @ 2010-03-10  0:17 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from d dot g dot gorbachev at gmail dot com  2010-03-10 00:17 -------
Created an attachment (id=20071)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20071&action=view)
Another testcase


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43057


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug middle-end/43057] [LTO] fold check: original tree changed by fold
  2010-02-13 14:27 [Bug lto/43057] New: " d dot g dot gorbachev at gmail dot com
@ 2010-02-27 14:02 ` zsojka at seznam dot cz
  2010-03-10  0:17 ` d dot g dot gorbachev at gmail dot com
  1 sibling, 0 replies; 8+ messages in thread
From: zsojka at seznam dot cz @ 2010-02-27 14:02 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from zsojka at seznam dot cz  2010-02-27 14:02 -------
Testcase fails when compiled as C++ code too (without -flto):

$ /mnt/sdb1/build-157106-checking-fold/gcc/cc1plus -O bug.c
 int main()
Analyzing compilation unit
Performing interprocedural optimizations
 <visibility> <*free_lang_data> <early_local_cleanups> <whole-program> <inline>
<static-var> <pure-const>Assembling functions:
 int main()
bug.c: In function &#8216;int main()&#8217;:
bug.c:3:5: internal compiler error: fold check: original tree changed by fold
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43057


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2010-11-22 19:59 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [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
2010-11-22 18:22 ` ubizjak at gmail dot com
2010-11-22 20:01 ` d.g.gorbachev at gmail dot com
2010-02-13 14:27 [Bug lto/43057] New: " d dot g dot gorbachev at gmail dot com
2010-02-27 14:02 ` [Bug middle-end/43057] " zsojka at seznam dot cz
2010-03-10  0:17 ` d dot g dot gorbachev at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).