This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/36879] [4.4 Regression] undefined reference to a variable
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Jul 2008 21:54:30 -0000
- Subject: [Bug tree-optimization/36879] [4.4 Regression] undefined reference to a variable
- References: <bug-36879-6528@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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