public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/54811] New: [4.8 regression] tree code '�' is not supported in LTO streams
@ 2012-10-04 13:58 ebotcazou at gcc dot gnu.org
  2012-10-04 16:25 ` [Bug lto/54811] " rguenth at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2012-10-04 13:58 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 54811
           Summary: [4.8 regression] tree code '�' is not supported in LTO
                    streams
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: ebotcazou@gcc.gnu.org
                CC: dehao@gcc.gnu.org
              Host: x86_64-suse-linux
            Target: x86_64-suse-linux
             Build: x86_64-suse-linux


This is similar to PR lto/54632.  LTO bootstrap with Ada enabled is broken:

gcc/xgcc -B/home/eric/build/gcc/native-lto/./prev-gcc/
-B/home/eric/install/gcc/x86_64-suse-linux/bin/
-B/home/eric/install/gcc/x86_64-suse-linux/bin/
-B/home/eric/install/gcc/x86_64-suse-linux/lib/ -isystem
/home/eric/install/gcc/x86_64-suse-linux/include -isystem
/home/eric/install/gcc/x86_64-suse-linux/sys-include    -c -g -O2
-flto=jobserver -frandom-seed=1  -gnatpg -gnata -W -Wall -nostdinc -I- -I.
-Iada -I/home/eric/svn/gcc/gcc/ada -I/home/eric/svn/gcc/gcc/ada/gcc-interface
/home/eric/svn/gcc/gcc/ada/sem_attr.adb -o ada/sem_attr.o
+===========================GNAT BUG DETECTED==============================+
| 4.8.0 20121004 (experimental) [trunk revision 192031] (x86_64-suse-linux) GCC
error:|
| tree code '�' is not supported in LTO streams                            |
| Error detected around /home/eric/svn/gcc/gcc/ada/sem_type.ads:65:9       |

raised SYSTEM.ASSERTIONS.ASSERT_FAILURE : namet.adb:655

(gdb) frame 3
#3  0x0000000000e3b45e in write_ts_exp_tree_pointers (ref_p=true, 
    expr=0x7ffff5e47620, ob=0x2533040)
    at /home/eric/svn/gcc/gcc/tree-streamer-out.c:677
677       stream_write_tree (ob, TREE_BLOCK (expr), ref_p);

(gdb) frame 2
#2  lto_output_tree (ob=0x2533040, expr=0x7ffff5d9ce60, ref_p=true, 
    this_ref_p=<optimized out>)
    at /home/eric/svn/gcc/gcc/lto-streamer-out.c:427
427           lto_write_tree (ob, expr, ref_p);
(gdb) p debug_generic_expr(expr)
<<< Unknown tree: � >>>

$2 = void
(gdb) frame 7
#7  0x0000000000e3b370 in write_ts_exp_tree_pointers (ref_p=true, 
    expr=0x7ffff546bc58, ob=0x2533040)
    at /home/eric/svn/gcc/gcc/tree-streamer-out.c:675
675         stream_write_tree (ob, TREE_OPERAND (expr, i), ref_p);
(gdb) p debug_generic_expr(expr)
MEM[(struct sem_type__interp *)&_init + 8B]


(gdb) frame 11
#11 0x0000000000e3a88a in write_ts_decl_common_tree_pointers (ref_p=true, 
    expr=0x7ffff53c4260, ob=0x2533040)
    at /home/eric/svn/gcc/gcc/tree-streamer-out.c:512
512         stream_write_tree (ob, DECL_DEBUG_EXPR (expr), ref_p);
(gdb) p debug_generic_expr(expr)
_init$8

(gdb) frame 15
#15 0x00000000014685b8 in output_gimple_stmt (stmt=0x7ffff4ea5828, 
    ob=0x2533040) at /home/eric/svn/gcc/gcc/gimple-streamer-out.c:138
138               stream_write_tree (ob, op, true);
(gdb) p debug_gimple_stmt(stmt)
# DEBUG _init$8 => it$F$abstract_op_118(D)


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

* [Bug lto/54811] [4.8 regression] tree code '�' is not supported in LTO streams
  2012-10-04 13:58 [Bug lto/54811] New: [4.8 regression] tree code '�' is not supported in LTO streams ebotcazou at gcc dot gnu.org
@ 2012-10-04 16:25 ` rguenth at gcc dot gnu.org
  2012-10-04 16:33 ` dehao at gcc dot gnu.org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-10-04 16:25 UTC (permalink / raw)
  To: gcc-bugs


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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rguenth at gcc dot gnu.org
   Target Milestone|---                         |4.8.0

--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-10-04 16:24:52 UTC ---
I suppose we forget to clear gimple_block of debug stmts in
remove_unused_block_scopes?


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

* [Bug lto/54811] [4.8 regression] tree code '�' is not supported in LTO streams
  2012-10-04 13:58 [Bug lto/54811] New: [4.8 regression] tree code '�' is not supported in LTO streams ebotcazou at gcc dot gnu.org
  2012-10-04 16:25 ` [Bug lto/54811] " rguenth at gcc dot gnu.org
@ 2012-10-04 16:33 ` dehao at gcc dot gnu.org
  2012-10-04 16:37 ` rguenth at gcc dot gnu.org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: dehao at gcc dot gnu.org @ 2012-10-04 16:33 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #2 from dehao at gcc dot gnu.org 2012-10-04 16:33:00 UTC ---
I think in clear_unused_block_pointer, we already removed all block for debug
statements.


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

* [Bug lto/54811] [4.8 regression] tree code '�' is not supported in LTO streams
  2012-10-04 13:58 [Bug lto/54811] New: [4.8 regression] tree code '�' is not supported in LTO streams ebotcazou at gcc dot gnu.org
  2012-10-04 16:25 ` [Bug lto/54811] " rguenth at gcc dot gnu.org
  2012-10-04 16:33 ` dehao at gcc dot gnu.org
@ 2012-10-04 16:37 ` rguenth at gcc dot gnu.org
  2012-10-04 16:38 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-10-04 16:37 UTC (permalink / raw)
  To: gcc-bugs


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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-10-04
     Ever Confirmed|0                           |1

--- Comment #3 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-10-04 16:37:31 UTC ---
No, look again - for some reason we skip debug stmts.  That's obviously
a bug.  Eric - mind testing the "obvious" patch?


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

* [Bug lto/54811] [4.8 regression] tree code '�' is not supported in LTO streams
  2012-10-04 13:58 [Bug lto/54811] New: [4.8 regression] tree code '�' is not supported in LTO streams ebotcazou at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2012-10-04 16:37 ` rguenth at gcc dot gnu.org
@ 2012-10-04 16:38 ` rguenth at gcc dot gnu.org
  2012-10-04 16:43 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-10-04 16:38 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #4 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-10-04 16:38:19 UTC ---
(In reply to comment #3)
> No, look again - for some reason we skip debug stmts.  That's obviously
> a bug.  Eric - mind testing the "obvious" patch?

Err, misread the code ;)  Not enough caffeine.


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

* [Bug lto/54811] [4.8 regression] tree code '�' is not supported in LTO streams
  2012-10-04 13:58 [Bug lto/54811] New: [4.8 regression] tree code '�' is not supported in LTO streams ebotcazou at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2012-10-04 16:38 ` rguenth at gcc dot gnu.org
@ 2012-10-04 16:43 ` rguenth at gcc dot gnu.org
  2012-10-05 10:11 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-10-04 16:43 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #5 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-10-04 16:43:37 UTC ---
Instead what happened is that I specifically restricted processing
DECL_DEBUG_EXPRs to local-vars in a previous fix.  But it seems that
local vars no longer contains this decl.  So it seems we have to
re-instantiate the case in the tree walker (we can't re-order
clear_unused_block_pointer () and removal of vars from local-decls
easily).


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

* [Bug lto/54811] [4.8 regression] tree code '�' is not supported in LTO streams
  2012-10-04 13:58 [Bug lto/54811] New: [4.8 regression] tree code '�' is not supported in LTO streams ebotcazou at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2012-10-04 16:43 ` rguenth at gcc dot gnu.org
@ 2012-10-05 10:11 ` rguenth at gcc dot gnu.org
  2012-10-05 11:48 ` rguenth at gcc dot gnu.org
  2012-10-05 11:49 ` rguenth at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-10-05 10:11 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #6 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-10-05 10:11:25 UTC ---
Testing

Index: gcc/tree-ssa-live.c
===================================================================
--- gcc/tree-ssa-live.c (revision 192114)
+++ gcc/tree-ssa-live.c (working copy)
@@ -621,6 +621,11 @@ clear_unused_block_pointer_1 (tree *tp,
   if (EXPR_P (*tp) && TREE_BLOCK (*tp)
       && !TREE_USED (TREE_BLOCK (*tp)))
     TREE_SET_BLOCK (*tp, NULL);
+  if (TREE_CODE (*tp) == VAR_DECL && DECL_DEBUG_EXPR_IS_FROM (*tp))
+    {
+      tree debug_expr = DECL_DEBUG_EXPR (*tp);
+      walk_tree (&debug_expr, clear_unused_block_pointer_1, NULL, NULL);
+    }
   return NULL_TREE;
 }


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

* [Bug lto/54811] [4.8 regression] tree code '�' is not supported in LTO streams
  2012-10-04 13:58 [Bug lto/54811] New: [4.8 regression] tree code '�' is not supported in LTO streams ebotcazou at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2012-10-05 10:11 ` rguenth at gcc dot gnu.org
@ 2012-10-05 11:48 ` rguenth at gcc dot gnu.org
  2012-10-05 11:49 ` rguenth at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-10-05 11:48 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #7 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-10-05 11:48:30 UTC ---
Author: rguenth
Date: Fri Oct  5 11:48:27 2012
New Revision: 192120

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=192120
Log:
2012-10-05  Richard Guenther  <rguenther@suse.de>

    PR middle-end/54811
    * tree-ssa-live.c (clear_unused_block_pointer_1): Look at
    DECL_DEBUG_EXPR again.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/tree-ssa-live.c


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

* [Bug lto/54811] [4.8 regression] tree code '�' is not supported in LTO streams
  2012-10-04 13:58 [Bug lto/54811] New: [4.8 regression] tree code '�' is not supported in LTO streams ebotcazou at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2012-10-05 11:48 ` rguenth at gcc dot gnu.org
@ 2012-10-05 11:49 ` rguenth at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-10-05 11:49 UTC (permalink / raw)
  To: gcc-bugs


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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #8 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-10-05 11:48:49 UTC ---
Fixed (Ada LTO bootstrap still fails).


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

end of thread, other threads:[~2012-10-05 11:49 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-04 13:58 [Bug lto/54811] New: [4.8 regression] tree code '�' is not supported in LTO streams ebotcazou at gcc dot gnu.org
2012-10-04 16:25 ` [Bug lto/54811] " rguenth at gcc dot gnu.org
2012-10-04 16:33 ` dehao at gcc dot gnu.org
2012-10-04 16:37 ` rguenth at gcc dot gnu.org
2012-10-04 16:38 ` rguenth at gcc dot gnu.org
2012-10-04 16:43 ` rguenth at gcc dot gnu.org
2012-10-05 10:11 ` rguenth at gcc dot gnu.org
2012-10-05 11:48 ` rguenth at gcc dot gnu.org
2012-10-05 11:49 ` rguenth at gcc dot gnu.org

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).