public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/55736] New: lto ICE: tree code ''junl is not supported in LTO streams
@ 2012-12-18 21:16 kilobyte at angband dot pl
  2012-12-19  0:57 ` [Bug lto/55736] " kilobyte at angband dot pl
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: kilobyte at angband dot pl @ 2012-12-18 21:16 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 55736
           Summary: lto ICE: tree code ''junl 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: kilobyte@angband.pl


Created attachment 29004
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29004
massive amd64 example

Another LTO breakage:
lto1: internal compiler error: tree code ‘�    ’ is not supported in LTO
streams

Too bad, the smallest test case I have right now is 73 files big (attached,
preprocessed for x86-64).  Multidelta takes an enormous amount of time: after
~36 hours, it processed only first --level=0 run on four of the files, and
they're still massive after deltaing.  Thus, this test case is enormous, sorry.

Fails on amd64 with gcc-4.8 svn 194557 (Debian 4.8-20121217-1) and gcc-snapshot
(trunk), 4.7 works fine.  So does 4.8 on i386.


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

* [Bug lto/55736] lto ICE: tree code ''junl is not supported in LTO streams
  2012-12-18 21:16 [Bug lto/55736] New: lto ICE: tree code ''junl is not supported in LTO streams kilobyte at angband dot pl
@ 2012-12-19  0:57 ` kilobyte at angband dot pl
  2012-12-19 10:51 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: kilobyte at angband dot pl @ 2012-12-19  0:57 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #1 from Adam Borowski <kilobyte at angband dot pl> 2012-12-19 00:57:12 UTC ---
Fails on armhf as well:
lto1: internal compiler error: tree code ‘\�PF9F���G�����P.�.lЕ�"0�+’ is not
supported in LTO streams

Works on i386.


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

* [Bug lto/55736] lto ICE: tree code ''junl is not supported in LTO streams
  2012-12-18 21:16 [Bug lto/55736] New: lto ICE: tree code ''junl is not supported in LTO streams kilobyte at angband dot pl
  2012-12-19  0:57 ` [Bug lto/55736] " kilobyte at angband dot pl
@ 2012-12-19 10:51 ` rguenth at gcc dot gnu.org
  2012-12-19 11:29 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-12-19 10:51 UTC (permalink / raw)
  To: gcc-bugs


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |lto
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2012-12-19
         AssignedTo|unassigned at gcc dot       |rguenth at gcc dot gnu.org
                   |gnu.org                     |
     Ever Confirmed|0                           |1

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> 2012-12-19 10:50:06 UTC ---
Confirmed.  We are writing

#3  0x0000000000bd2802 in write_ts_exp_tree_pointers (ob=0x20b4000, 
    expr=0x7ffff5d99ca0, ref_p=false)
    at /space/rguenther/src/svn/trunk/gcc/tree-streamer-out.c:747
747       stream_write_tree (ob, TREE_BLOCK (expr), ref_p);

of an ADDR_EXPR:

(gdb) call debug_tree (expr)
 <addr_expr 0x7ffff5d99ca0
    type <pointer_type 0x7ffff69380a8
        type <array_type 0x7ffff6938150 type <integer_type 0x7ffff6924930 char>
            BLK
            size <integer_cst 0x7ffff6917940 constant 88>
            unit size <integer_cst 0x7ffff6917960 constant 11>
            align 8 symtab 0 alias set -1 canonical type 0x7ffff69381f8 domain
<integer_type 0x7ffff69382a0>
            pointer_to_this <pointer_type 0x7ffff69380a8>>
        unsigned DI
        size <integer_cst 0x7ffff67e2d20 constant 64>
        unit size <integer_cst 0x7ffff67e2d40 constant 8>
        align 64 symtab 0 alias set -1 canonical type 0x7ffff69380a8>
    readonly constant
    arg 0 <string_cst 0x7ffff5d99cc0 type <array_type 0x7ffff6938150>
        readonly constant static "<lightred>\000">>

but it seems to have been collected.

The ADDR_EXPR is inside a CONSTRUCTOR which is created by switch-conversion:

 <var_decl 0x7ffff316fab0 CSWTCH.1083
    type <array_type 0x7ffff1112d20
        type <pointer_type 0x7ffff65a5150 type <array_type 0x7ffff65a51f8>
            unsigned DI
            size <integer_cst 0x7ffff67e2d20 constant 64>
            unit size <integer_cst 0x7ffff67e2d40 constant 8>
            align 64 symtab 0 alias set -1 canonical type 0x7ffff69380a8>
        BLK
        size <integer_cst 0x7ffff6917900 constant 448>
        unit size <integer_cst 0x7ffff6917b20 constant 56>
        align 64 symtab 0 alias set -1 canonical type 0x7ffff1112d20
        domain <integer_type 0x7ffff693e150 type <integer_type 0x7ffff67f3000
sizetype>
            DI size <integer_cst 0x7ffff67e2d20 64> unit size <integer_cst
0x7ffff67e2d40 8>
            align 64 symtab 0 alias set -1 canonical type 0x7ffff67f3738
precision 64 min <integer_cst 0x7ffff67e2d60 0> max <integer_cst 0x7ffff6917b40
6>>
        pointer_to_this <pointer_type 0x7ffff0e8a150>>
    readonly constant static BLK file output.cc line 1198 col 0 size
<integer_cst 0x7ffff6917900 448> unit size <integer_cst 0x7ffff6917b20 56>
    align 256 initial <constructor 0x7ffff104f360>>

DECL_INITIAL is written via

322       /* Write any LTO-specific data to OB.  */
323       if (DECL_P (expr)
324           && TREE_CODE (expr) != FUNCTION_DECL
325           && TREE_CODE (expr) != TRANSLATION_UNIT_DECL)
326         {
327           /* Handle DECL_INITIAL for symbols.  */
328           tree initial = DECL_INITIAL (expr);
329           if (TREE_CODE (expr) == VAR_DECL
(gdb) l
330               && (TREE_STATIC (expr) || DECL_EXTERNAL (expr))
331               && !DECL_IN_CONSTANT_POOL (expr)
332               && initial)
333             {
334               lto_symtab_encoder_t encoder;
335               struct varpool_node *vnode;
336
337               encoder = ob->decl_state->symtab_node_encoder;
338               vnode = varpool_get_node (expr);
339               if (!vnode
...

so we seem to have an issue with BLOCKs being referenced from DECL_INITIALs
of decls we put into varpool.  The case in question (switch-conversion)
may be the only way this happens, but who knows what frontends do here?

Btw, switch-conversion forgets to unshare the exprs as well.


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

* [Bug lto/55736] lto ICE: tree code ''junl is not supported in LTO streams
  2012-12-18 21:16 [Bug lto/55736] New: lto ICE: tree code ''junl is not supported in LTO streams kilobyte at angband dot pl
  2012-12-19  0:57 ` [Bug lto/55736] " kilobyte at angband dot pl
  2012-12-19 10:51 ` rguenth at gcc dot gnu.org
@ 2012-12-19 11:29 ` rguenth at gcc dot gnu.org
  2012-12-19 13:54 ` rguenth at gcc dot gnu.org
  2012-12-19 13:55 ` rguenth at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-12-19 11:29 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> 2012-12-19 11:28:45 UTC ---
Created attachment 29005
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29005
patch

Patch I am testing (works for the testcase).


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

* [Bug lto/55736] lto ICE: tree code ''junl is not supported in LTO streams
  2012-12-18 21:16 [Bug lto/55736] New: lto ICE: tree code ''junl is not supported in LTO streams kilobyte at angband dot pl
                   ` (2 preceding siblings ...)
  2012-12-19 11:29 ` rguenth at gcc dot gnu.org
@ 2012-12-19 13:54 ` rguenth at gcc dot gnu.org
  2012-12-19 13:55 ` rguenth at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-12-19 13:54 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> 2012-12-19 13:53:31 UTC ---
Author: rguenth
Date: Wed Dec 19 13:53:18 2012
New Revision: 194609

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=194609
Log:
2012-12-19  Richard Biener  <rguenther@suse.de>

    PR tree-optimization/55736
    PR tree-optimization/55703
    * gimplify.c (prune_expr_location): New function.
    (unshare_expr_without_location): Likewise.
    * tree.h (unshare_expr_without_location): Declare.
    * ipa-prop.c (prune_expression_for_jf): Remove.
    (prune_expression_for_jf_1): Likewise.
    (ipa_set_jf_constant): Use unshare_expr_without_location.
    (ipa_set_jf_arith_pass_through): Likewise.
    (determine_known_aggregate_parts): Likewise.
    * tree-switch-conversion.c (build_constructors): Use
    unshare_expr_without_location on all constructor elements.

    * gcc.dg/lto/pr55703_0.c: New testcase.

Added:
    trunk/gcc/testsuite/gcc.dg/lto/pr55703_0.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/gimplify.c
    trunk/gcc/ipa-prop.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-switch-conversion.c
    trunk/gcc/tree.h


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

* [Bug lto/55736] lto ICE: tree code ''junl is not supported in LTO streams
  2012-12-18 21:16 [Bug lto/55736] New: lto ICE: tree code ''junl is not supported in LTO streams kilobyte at angband dot pl
                   ` (3 preceding siblings ...)
  2012-12-19 13:54 ` rguenth at gcc dot gnu.org
@ 2012-12-19 13:55 ` rguenth at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-12-19 13:55 UTC (permalink / raw)
  To: gcc-bugs


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

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

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

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> 2012-12-19 13:54:46 UTC ---
Fixed.


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

end of thread, other threads:[~2012-12-19 13:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-18 21:16 [Bug lto/55736] New: lto ICE: tree code ''junl is not supported in LTO streams kilobyte at angband dot pl
2012-12-19  0:57 ` [Bug lto/55736] " kilobyte at angband dot pl
2012-12-19 10:51 ` rguenth at gcc dot gnu.org
2012-12-19 11:29 ` rguenth at gcc dot gnu.org
2012-12-19 13:54 ` rguenth at gcc dot gnu.org
2012-12-19 13:55 ` 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).