Re: [PATCH] debug/PR78112: remove recent duplicates for DW_TAG_subprogram attributes
Hi Christophe, On 11/18/2016 03:03 PM, Christophe Lyon wrote: Hi, Part of the new testcase added with this commit fails on arm* targets: g++.dg/pr78112.C scan-assembler-times DW_AT_object_pointer 37 Thank you for the report. As I said on the bugzilla (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78112#c17), I reproduce inconsistent results on this even on a very reduced testcase. So I wonder if I should just remove this testcase. -- Pierre-Marie de Rodat
Re: [PATCH] debug/PR78112: remove recent duplicates for DW_TAG_subprogram attributes
On 10 November 2016 at 12:06, Pierre-Marie de Rodatwrote: > On 11/09/2016 10:02 AM, Richard Biener wrote: >> >> Using scan-assembler-times on the dwarf? > > > I always have a bad feeling about this kind of check as I imagine it can > break very easily with legit changes. But I have nothing better to > contribute, so I’ve added one such testcase. ;-) > >>> Ok to commit? >> >> >> Ok. > > > This is committed as r242035. Thanks! > Hi, Part of the new testcase added with this commit fails on arm* targets: g++.dg/pr78112.C scan-assembler-times DW_AT_object_pointer 37 Christophe > -- > Pierre-Marie de Rodat
Re: [PATCH] debug/PR78112: remove recent duplicates for DW_TAG_subprogram attributes
On 11/09/2016 10:02 AM, Richard Biener wrote: Using scan-assembler-times on the dwarf? I always have a bad feeling about this kind of check as I imagine it can break very easily with legit changes. But I have nothing better to contribute, so I’ve added one such testcase. ;-) Ok to commit? Ok. This is committed as r242035. Thanks! -- Pierre-Marie de Rodat
Re: [PATCH] debug/PR78112: remove recent duplicates for DW_TAG_subprogram attributes
On Tue, Nov 8, 2016 at 3:24 PM, Pierre-Marie de Rodatwrote: > Hello, > > This patch comes from the discussion for PR debug/78112 > (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78112). It seems to fix > the regression Rainer detected on x86_64-apple-darwin, although I still > wonder why remaining duplicate attributes (which were already present > before my original patch) are not a problem on this platform. > > Anyway, bootstrapped and regtested on x86_64-linux. As I said on the > PR, I managed to check with a Python script that there were no > duplicates anymore but I don't know how to turn this into a DejaGNU > testcase. Using scan-assembler-times on the dwarf? > Ok to commit? Ok. Richard. > gcc/ > > PR debug/78112 > * dwarf2out.c (dwarf2out_early_global_decl): Call dwarf2out_decl > on the context only when it has no DIE yet. > --- > gcc/dwarf2out.c | 8 > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c > index 1dfff38..f9ec090 100644 > --- a/gcc/dwarf2out.c > +++ b/gcc/dwarf2out.c > @@ -25256,11 +25256,11 @@ dwarf2out_early_global_decl (tree decl) > if (!DECL_STRUCT_FUNCTION (decl)) > goto early_decl_exit; > > - /* For nested functions, emit DIEs for the parents first so that all > -nested DIEs are generated at the proper scope in the first > -shot. */ > + /* For nested functions, make sure we have DIEs for the parents > first > +so that all nested DIEs are generated at the proper scope in the > +first shot. */ > tree context = decl_function_context (decl); > - if (context != NULL) > + if (context != NULL && lookup_decl_die (context) == NULL) > { > current_function_decl = context; > dwarf2out_decl (context); > -- > 2.10.2 >
[PATCH] debug/PR78112: remove recent duplicates for DW_TAG_subprogram attributes
Hello, This patch comes from the discussion for PR debug/78112 (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78112). It seems to fix the regression Rainer detected on x86_64-apple-darwin, although I still wonder why remaining duplicate attributes (which were already present before my original patch) are not a problem on this platform. Anyway, bootstrapped and regtested on x86_64-linux. As I said on the PR, I managed to check with a Python script that there were no duplicates anymore but I don't know how to turn this into a DejaGNU testcase. Ok to commit? gcc/ PR debug/78112 * dwarf2out.c (dwarf2out_early_global_decl): Call dwarf2out_decl on the context only when it has no DIE yet. --- gcc/dwarf2out.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 1dfff38..f9ec090 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -25256,11 +25256,11 @@ dwarf2out_early_global_decl (tree decl) if (!DECL_STRUCT_FUNCTION (decl)) goto early_decl_exit; - /* For nested functions, emit DIEs for the parents first so that all -nested DIEs are generated at the proper scope in the first -shot. */ + /* For nested functions, make sure we have DIEs for the parents first +so that all nested DIEs are generated at the proper scope in the +first shot. */ tree context = decl_function_context (decl); - if (context != NULL) + if (context != NULL && lookup_decl_die (context) == NULL) { current_function_decl = context; dwarf2out_decl (context); -- 2.10.2