------- Comment #1 from pinskia at gcc dot gnu dot org  2008-07-19 21:54 -------
I have a patch which I am testing right now:
Index: gcc/gcc/tree-switch-conversion.c
===================================================================
--- gcc/gcc/tree-switch-conversion.c    (revision 137991)
+++ gcc/gcc/tree-switch-conversion.c    (working copy)
@@ -474,7 +474,8 @@ build_one_array (tree swtch, int num, tr
   DECL_ARTIFICIAL (decl) = 1;
   TREE_CONSTANT (decl) = 1;
   add_referenced_var (decl);
-  assemble_variable (decl, 0, 0, 0);
+  varpool_mark_needed_node (varpool_node (decl));
+  varpool_finalize_decl (decl);
   mark_sym_for_renaming (decl);

   name = make_ssa_name (SSA_NAME_VAR (PHI_RESULT (phi)), NULL_TREE);

---- CUT ----
There is still a missed optimization but I will test/submit that patch
separately.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |segher at kernel dot
                   |                            |crashing dot org
         AssignedTo|unassigned at gcc dot gnu   |pinskia at gcc dot gnu dot
                   |dot org                     |org
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2008-07-19 21:54:30
               date|                            |
   Target Milestone|---                         |4.4.0


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

Reply via email to