public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/54876] New: [4.8 Regression] LTO bootstrap broken, streaming garbage-collected BLOCK
@ 2012-10-09 15:21 rguenth at gcc dot gnu.org
  2012-10-09 15:24 ` [Bug bootstrap/54876] " rguenth at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-10-09 15:21 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 54876
           Summary: [4.8 Regression] LTO bootstrap broken, streaming
                    garbage-collected BLOCK
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: bootstrap
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: rguenth@gcc.gnu.org
                CC: dehao@gcc.gnu.org, jamborm@gcc.gnu.org


We are streaming a GCed TREE_BLOCK of

(gdb) p expr->base.code
$5 = MEM_REF
(gdb) p expr->base.code
$6 = ADDR_EXPR

from output_node_opt_summary here:

      /* At the moment we assume all old trees to be PARM_DECLs, because we
have no
         mechanism to store function local declarations into summaries.  */
      gcc_assert (parm);
      streamer_write_uhwi (ob, parm_num);
      gcc_assert (EXPR_LOCATION (map->new_tree) == UNKNOWN_LOCATION);
      stream_write_tree (ob, map->new_tree, true);

we need to clear all TREE_BLOCKs from this.  Not sure if new_tree originates
from a tree that eventually comes along prune_expression_for_jf, but

static tree
prune_expression_for_jf (tree exp)
{
  if (EXPR_P (exp))
    {
      exp = unshare_expr (exp);
      SET_EXPR_LOCATION (exp, UNKNOWN_LOCATION);
    }
  return exp;
}

is not enough.  You need to walk_tree exp, as in this case it is &MEM_REF
and all sub-expressions can contain a location.


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

* [Bug bootstrap/54876] [4.8 Regression] LTO bootstrap broken, streaming garbage-collected BLOCK
  2012-10-09 15:21 [Bug bootstrap/54876] New: [4.8 Regression] LTO bootstrap broken, streaming garbage-collected BLOCK rguenth at gcc dot gnu.org
@ 2012-10-09 15:24 ` rguenth at gcc dot gnu.org
  2012-10-09 15:29 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-10-09 15:24 UTC (permalink / raw)
  To: gcc-bugs


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2012-10-09
         AssignedTo|unassigned at gcc dot       |rguenth at gcc dot gnu.org
                   |gnu.org                     |
   Target Milestone|---                         |4.8.0
     Ever Confirmed|0                           |1

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> 2012-10-09 15:24:26 UTC ---
Like the following:

Index: gcc/ipa-prop.c
===================================================================
--- gcc/ipa-prop.c      (revision 192255)
+++ gcc/ipa-prop.c      (working copy)
@@ -287,6 +287,16 @@ ipa_print_all_jump_functions (FILE *f)
     }
 }

+/* Worker for prune_expression_for_jf.  */
+
+static tree
+prune_expression_for_jf_1 (tree *tp, int *, void *)
+{
+  if (EXPR_P (*tp))
+    SET_EXPR_LOCATION (*tp, UNKNOWN_LOCATION);
+  return *tp;
+}
+
 /* Return the expression tree EXPR unshared and with location stripped off. 
*/

 static tree
@@ -295,7 +305,7 @@ prune_expression_for_jf (tree exp)
   if (EXPR_P (exp))
     {
       exp = unshare_expr (exp);
-      SET_EXPR_LOCATION (exp, UNKNOWN_LOCATION);
+      walk_tree (&exp, prune_expression_for_jf_1, NULL, NULL);
     }
   return exp;
 }


not sure if we shouldn't simply bite the bullet and identify whether we
stream to a non-function section and drop LOCATION_BLOCK there during
streaming itself.

Testing the above now.


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

* [Bug bootstrap/54876] [4.8 Regression] LTO bootstrap broken, streaming garbage-collected BLOCK
  2012-10-09 15:21 [Bug bootstrap/54876] New: [4.8 Regression] LTO bootstrap broken, streaming garbage-collected BLOCK rguenth at gcc dot gnu.org
  2012-10-09 15:24 ` [Bug bootstrap/54876] " rguenth at gcc dot gnu.org
@ 2012-10-09 15:29 ` rguenth at gcc dot gnu.org
  2012-10-09 16:45 ` markus at trippelsdorf dot de
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-10-09 15:29 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> 2012-10-09 15:29:12 UTC ---
Err,

static tree
prune_expression_for_jf_1 (tree *tp, int *walk_subtrees, void *)
{
  if (EXPR_P (*tp))
    SET_EXPR_LOCATION (*tp, UNKNOWN_LOCATION);
  else
    *walk_subtrees = 0;
  return NULL_TREE;
}

of course.


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

* [Bug bootstrap/54876] [4.8 Regression] LTO bootstrap broken, streaming garbage-collected BLOCK
  2012-10-09 15:21 [Bug bootstrap/54876] New: [4.8 Regression] LTO bootstrap broken, streaming garbage-collected BLOCK rguenth at gcc dot gnu.org
  2012-10-09 15:24 ` [Bug bootstrap/54876] " rguenth at gcc dot gnu.org
  2012-10-09 15:29 ` rguenth at gcc dot gnu.org
@ 2012-10-09 16:45 ` markus at trippelsdorf dot de
  2012-10-09 18:36 ` rguenther at suse dot de
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: markus at trippelsdorf dot de @ 2012-10-09 16:45 UTC (permalink / raw)
  To: gcc-bugs


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

Markus Trippelsdorf <markus at trippelsdorf dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |markus at trippelsdorf dot
                   |                            |de

--- Comment #3 from Markus Trippelsdorf <markus at trippelsdorf dot de> 2012-10-09 16:45:22 UTC ---
Offtopic, but who's Richard Biener?


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

* [Bug bootstrap/54876] [4.8 Regression] LTO bootstrap broken, streaming garbage-collected BLOCK
  2012-10-09 15:21 [Bug bootstrap/54876] New: [4.8 Regression] LTO bootstrap broken, streaming garbage-collected BLOCK rguenth at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2012-10-09 16:45 ` markus at trippelsdorf dot de
@ 2012-10-09 18:36 ` rguenther at suse dot de
  2012-10-10  8:49 ` rguenth at gcc dot gnu.org
  2012-10-10  8:51 ` rguenth at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: rguenther at suse dot de @ 2012-10-09 18:36 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #4 from rguenther at suse dot de <rguenther at suse dot de> 2012-10-09 18:35:53 UTC ---
markus at trippelsdorf dot de <gcc-bugzilla@gcc.gnu.org> wrote:

>
>http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54876
>
>Markus Trippelsdorf <markus at trippelsdorf dot de> changed:
>
>           What    |Removed                     |Added
>----------------------------------------------------------------------------
>             CC|                            |markus at trippelsdorf dot
>                   |                            |de
>
>--- Comment #3 from Markus Trippelsdorf <markus at trippelsdorf dot de>
>2012-10-09 16:45:22 UTC ---
>Offtopic, but who's Richard Biener?

That's me.


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

* [Bug bootstrap/54876] [4.8 Regression] LTO bootstrap broken, streaming garbage-collected BLOCK
  2012-10-09 15:21 [Bug bootstrap/54876] New: [4.8 Regression] LTO bootstrap broken, streaming garbage-collected BLOCK rguenth at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2012-10-09 18:36 ` rguenther at suse dot de
@ 2012-10-10  8:49 ` rguenth at gcc dot gnu.org
  2012-10-10  8:51 ` rguenth at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-10-10  8:49 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> 2012-10-10 08:48:56 UTC ---
Author: rguenth
Date: Wed Oct 10 08:48:47 2012
New Revision: 192293

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

    PR middle-end/54876
    * ipa-prop.c (prune_expression_for_jf_1): New function.
    (prune_expression_for_jf): Clear EXPR_LOCATION for all
    sub-expressions as well.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/ipa-prop.c


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

* [Bug bootstrap/54876] [4.8 Regression] LTO bootstrap broken, streaming garbage-collected BLOCK
  2012-10-09 15:21 [Bug bootstrap/54876] New: [4.8 Regression] LTO bootstrap broken, streaming garbage-collected BLOCK rguenth at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2012-10-10  8:49 ` rguenth at gcc dot gnu.org
@ 2012-10-10  8:51 ` rguenth at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-10-10  8:51 UTC (permalink / raw)
  To: gcc-bugs


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

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

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

--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> 2012-10-10 08:50:58 UTC ---
Fixed.


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

end of thread, other threads:[~2012-10-10  8:51 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-09 15:21 [Bug bootstrap/54876] New: [4.8 Regression] LTO bootstrap broken, streaming garbage-collected BLOCK rguenth at gcc dot gnu.org
2012-10-09 15:24 ` [Bug bootstrap/54876] " rguenth at gcc dot gnu.org
2012-10-09 15:29 ` rguenth at gcc dot gnu.org
2012-10-09 16:45 ` markus at trippelsdorf dot de
2012-10-09 18:36 ` rguenther at suse dot de
2012-10-10  8:49 ` rguenth at gcc dot gnu.org
2012-10-10  8:51 ` 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).