This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug lto/42088] flag_gtoggle in free_lang_data hides -fcompare-debug errors
- 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: 18 Nov 2009 10:28:25 -0000
- Subject: [Bug lto/42088] flag_gtoggle in free_lang_data hides -fcompare-debug errors
- References: <bug-42088-334@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 2009-11-18 10:28 -------
Hmpf, no testcases ...
./xgcc -B. -c tree.i -O -g -fcompare-debug=-g0
has a compare-debug failure (-O0 does not). Fixed by
Index: gcc/tree.c
===================================================================
--- gcc/tree.c (revision 154283)
+++ gcc/tree.c (working copy)
@@ -4313,7 +4313,8 @@ free_lang_data_in_block (tree fn, tree b
tp = &BLOCK_VARS (block);
while (*tp)
{
- if (!pointer_set_contains (locals, *tp))
+ if (TREE_CODE (*tp) == VAR_DECL
+ && !pointer_set_contains (locals, *tp))
*tp = TREE_CHAIN (*tp);
else
tp = &TREE_CHAIN (*tp);
Note that UID differences that do not change UID order are a red herring
IMHO and should be tracked down and fixed. Any idea where this particular
one comes from? Most of the time it's walking hashtables in hash order,
like FOR_EACH_REFERENCED_VAR does. Relevant such walkings might be
in insert_phi_nodes, analyze_all_variable_accesses (both easy to fix,
but fixing them doesn't fix the debug miscompare).
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |rguenth at gcc dot gnu dot
|dot org |org
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2009-11-18 10:28:24
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42088