This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix PR42454 caused regression


On Tue, Dec 22, 2009 at 04:13:59PM -0800, Cary Coutant wrote:
> >> Looks OK, but the duplication of code from add_ranges_num isn't ideal.
> >> Maybe a new helper function would make things cleaner, something like
> >> this:
> >
> > Bootstrapped and regtested. And it generates correct compile_unit DIEs.
> >
> > Is this OK, or is Jakub's fix preferable?
> 
> I've extended the aranges-fnsec-1.c test to cover this as well. Here's
> an updated patch...

I don't care either way, let Jason decide, just perhaps your function name
is way too long and some shorter one would make it more nicely formatted.

> --- testsuite/gcc.dg/debug/dwarf2/aranges-fnsec-1.c	(revision 155407)
> +++ testsuite/gcc.dg/debug/dwarf2/aranges-fnsec-1.c	(working copy)
> @@ -1,9 +1,10 @@
> -/* Test that .debug_aranges does not have an entry for the text
> -   section if nothing went in there.  */
> +/* Test that .debug_aranges and .debug_ranges do not have an entry for the
> +   text section if nothing went in there.  */
>  /* Origin: Joseph Myers <joseph@codesourcery.com> */
>  /* { dg-do compile } */
> -/* { dg-options "-gdwarf-2 -ffunction-sections -w" } */
> +/* { dg-options "-gdwarf-2 -ffunction-sections -w -dA" } */
>  /* { dg-final { scan-assembler-not "\\.Letext0-\\.Ltext0" } } */
> +/* { dg-final { scan-assembler-not "\\.Ltext0.*Offset 0x0" } } */

You could also add scan-assembler for DW_AT_ranges (that would catch this
bug).

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]