This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/30700] [4.2 Regression] YA bogus undefined reference error to static func with -g and -O
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Feb 2007 18:02:37 -0000
- Subject: [Bug middle-end/30700] [4.2 Regression] YA bogus undefined reference error to static func with -g and -O
- References: <bug-30700-12387@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from rguenth at gcc dot gnu dot org 2007-02-04 18:02 -------
Index: dwarf2out.c
===================================================================
*** dwarf2out.c (revision 121576)
--- dwarf2out.c (working copy)
*************** reference_to_unused (tree * tp, int * wa
*** 10007,10012 ****
--- 10007,10018 ----
if (!node->needed)
return *tp;
}
+ else if (DECL_P (*tp) && TREE_CODE (*tp) == FUNCTION_DECL)
+ {
+ struct cgraph_node *node = cgraph_node (*tp);
+ if (!node->needed)
+ return *tp;
+ }
return NULL_TREE;
}
honza - does this look sane and can we maybe do this whole function in
graph ways?
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hubicka at gcc dot gnu dot
| |org
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2007-02-04 18:02:36
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30700