Summary: | [4.2 Regression] YA bogus undefined reference error to static func with -g and -O | ||
---|---|---|---|
Product: | gcc | Reporter: | Martin Michlmayr <tbm> |
Component: | middle-end | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | fang, gcc-bugs, hubicka, rguenth |
Priority: | P1 | Keywords: | link-failure |
Version: | 4.2.0 | ||
Target Milestone: | 4.2.0 | ||
Host: | Target: | ||
Build: | Known to work: | 4.1.1 4.1.2 4.3.0 | |
Known to fail: | 4.2.0 | Last reconfirmed: | 2007-02-04 18:02:36 |
Bug Depends on: | 31899 | ||
Bug Blocks: |
Description
Martin Michlmayr
2007-02-04 17:50:25 UTC
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? Fixed on the mainline by Author: hubicka Date: Fri Mar 30 09:03:55 2007 New Revision: 123358 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=123358 Log: PR middle-end/PR30700 * dwarf2out.c (reference_to_unused): Ask cgraph for functions availablility; add more sanity checking; ask varpool only about VAR_DECL. Modified: trunk/gcc/ChangeLog trunk/gcc/dwarf2out.c I'm puzzled why the fix for this PR was checked into mainline instead of gcc 4.2 branch since only gcc 4.2 is marked as known to fail. If you click on "View Bug Activity" you'll see that the bug used to be marked as 4.2/4.3. Richi changed it to 4.2 only when the patch got committed to mainline. Does that mean that the patch for mainline wouldn't work on gcc 4.2 branch or that the patch just hasn't been applied to gcc 4.2 branch yet? The latter. Subject: Bug 30700 Author: hubicka Date: Tue Apr 17 19:02:09 2007 New Revision: 123922 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=123922 Log: PR middle-end/30700 * dwarf2out.c (reference_to_unused): Ask cgraph for functions availablility; add more sanity checking; ask varpool only about VAR_DECL. Modified: branches/gcc-4_2-branch/gcc/ChangeLog branches/gcc-4_2-branch/gcc/dwarf2out.c Fixed. |