------- Comment #1 from pinskia at gcc dot gnu dot org  2005-12-31 17:19 -------
the ICE is on the SSA_NAME for the PARM_DECL for the chain variable for nested
function

I might have a fix, I think the normal issue as not treating this PARM_DECL
live at the beginging of the first BB is the issue.

Here is the patch which I am testing right now:
Index: tree-ssa-pre.c
===================================================================
--- tree-ssa-pre.c      (revision 109198)
+++ tree-ssa-pre.c      (working copy)
@@ -3086,6 +3086,18 @@ compute_avail (void)
        }
     }

+  if (cfun->static_chain_decl)
+    {
+      param = cfun->static_chain_decl;
+      if (default_def (param) != NULL)
+        {
+          tree def = default_def (param);
+          vn_lookup_or_add (def, NULL);
+          bitmap_insert_into_set (TMP_GEN (ENTRY_BLOCK_PTR), def);
+          bitmap_value_insert_into_set (AVAIL_OUT (ENTRY_BLOCK_PTR), def);
+        }
+    }
+
   /* Allocate the worklist.  */
   worklist = XNEWVEC (basic_block, n_basic_blocks);


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org
         AssignedTo|unassigned at gcc dot gnu   |pinskia at gcc dot gnu dot
                   |dot org                     |org
             Status|UNCONFIRMED                 |ASSIGNED
          Component|ada                         |tree-optimization
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-12-31 17:19:54
               date|                            |
            Summary|Ada bootstrap failure on    |[4.2 Regression] Ada
                   |x86_64                      |bootstrap failure on x86_64
                   |find_or_generate_expression,|find_or_generate_expression,
                   |at tree-ssa-pre.c:2028      |at tree-ssa-pre.c:2028
   Target Milestone|---                         |4.2.0


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


Reply via email to