This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR debug/19327
- From: Daniel Berlin <dberlin at dberlin dot org>
- To: Eric Botcazou <ebotcazou at libertysurf dot fr>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 18 Jan 2005 09:52:50 -0500 (EST)
- Subject: Re: [PATCH] Fix PR debug/19327
- References: <200501180621.51283.ebotcazou@libertysurf.fr>
On Tue, 18 Jan 2005, Eric Botcazou wrote:
Hi,
The patch
2005-01-03 Daniel Berlin <dberlin@dberlin.org>
Fix PR debug/17924
Fix PR debug/19191
* dwarf2out.c (block_ultimate_origin): Follow decl origin if origin
is a decl.
* gimple-low.c (mark_blocks_with_used_vars): New function.
(mark_blocks_with_used_subblocks): Ditto.
(mark_used_blocks): Ditto.
(pass_mark_used_blocks): New pass.
* tree-inline.c: Include debug.h.
(expand_call_inline): Call outlining_inline_function here.
* tree-optimize.c (init_tree_optimization_passes): Add
pass_mark_used_blocks.
* tree-pass.h (pass_mark_used_blocks): New.
* Makefile.in (tree-inline.o): Add debug.h dependency.
has introduced the following regression on platforms using STABS:
Just FYI, it didn't introduce the regression.
That implies the patch is broken.
This is a latent bug, the compiler was broken already
You were just getting lucky. There was nothing previously stopping the
compiler from calling the functions like this, given certain flags,
attributes, etc. In fact, while working on the patch, I had constructed a
testcase that would fail without the above patch, in the same manner, for
dwarf2, just to satisfy myself that this was true, and that it worked the
way i thought it did.
In terms of fixing it, yes, there is no difference between a latent bug
and a regression, but you make it seem like the patch's code was broken,
which it isn't.
Index: dbxout.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/dbxout.c,v
retrieving revision 1.216
diff -u -p -r1.216 dbxout.c
--- dbxout.c 9 Dec 2004 10:54:32 -0000 1.216
+++ dbxout.c 17 Jan 2005 15:57:45 -0000
@@ -2429,6 +2429,9 @@ dbxout_symbol (tree decl, int local ATTR
context = decl_function_context (decl);
if (context == current_function_decl)
break;
+ /* Don't mention an inline instance of a nested function. */
+ if (context && DECL_FROM_INLINE (decl))
+ break;
if (!MEM_P (DECL_RTL (decl))
|| GET_CODE (XEXP (DECL_RTL (decl), 0)) != SYMBOL_REF)
break;