This is the mail archive of the 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] PR debug/42487, xfail scan-assembler on DW_AT_ranges in gcc.dg/debug/dwarf2/aranges-fnsec-1.c for darwin

On Tue, Aug 17, 2010 at 08:26:55AM -0700, Richard Henderson wrote:
> On 08/17/2010 08:16 AM, Jack Howarth wrote:
> > On Tue, Aug 17, 2010 at 08:08:05AM -0700, Mark Mitchell wrote:
> >> Richard Henderson wrote:
> >>>> +/* { dg-final { scan-assembler "DW_AT_ranges" { xfail *-*-darwin* } } } */
> >>>
> >>> You should use a dg-skip-if.  The other two tests *should* be failing,
> >>> but don't because the regexp's incorrectly use a "." unconditionally.
> >>
> >> And we shouldn't be adding more xfail's for specific operating systems,
> >> unless absolutely necessary.  If the issue here is that we don't have
> >> -function-sections, then presumably the test will fail on all targets
> >> with that characteristic, and we should use the "effective target"
> >> machinery to guard the test.
> > 
> > Richard,
> >    This patch has been superseded by
> > based on Richard Henderson's comments. Can you review that one instead?
> Well, that new patch is what I asked for, but Mark is asking for
> something more.  In gcc/testsuite/lib/target-supports-dg.exp, add
> a proc dg-require-function-sections, then add a line
>   { dg-require function-sections }
> to the testcase.
> I'm not sure how to test for function sections for Darwin.  
> Ordinarily I would think you would look for an error message from
> the compiler, but for some reason Darwin doesn't generate one 
> and yet still fails to actually use function sections.
> Probably what you'll want to do is match the target_triplet in
> there.  See dg-require-dll.

   Aren't the targets which don't support function sections also
those that set TARGET_ASM_FUNCTION_RODATA_SECTION to default_no_function_rodata_section?

2004-08-12  Jakub Jelinek  <>

        PR c++/16276
        * output.h (default_function_rodata_section,
        default_no_function_rodata_section): New prototypes.
        * target.h (struct gcc_target): Add asm_out.function_rodata_section.
        * target-def.h (TARGET_ASM_FUNCTION_RODATA_SECTION): Define.
        (TARGET_ASM_OUT): Add it.
        * varasm.c (default_function_rodata_section,
        default_no_function_rodata_section): New functions.
        * final.c (final_scan_insn): Call
        targetm.asm_out.function_rodata_section instead of
        * config/darwin.h (TARGET_ASM_FUNCTION_RODATA_SECTION): Define.
        * config/mcore/mcore.c (TARGET_ASM_FUNCTION_RODATA_SECTION): Likewise.
        * config/ip2k/ip2k.c (TARGET_ASM_FUNCTION_RODATA_SECTION): Likewise.
        * config/rs6000/xcoff.h (TARGET_ASM_FUNCTION_RODATA_SECTION):
        * config/alpha/alpha.c (TARGET_ASM_FUNCTION_RODATA_SECTION): Likewise.
        * config/i386/cygming.h (TARGET_ASM_FUNCTION_RODATA_SECTION):
        * config/i386/i386-interix.h (TARGET_ASM_FUNCTION_RODATA_SECTION):
        * config/arm/pe.h (TARGET_ASM_FUNCTION_RODATA_SECTION): Likewise.
        * config/avr/avr.c (TARGET_ASM_FUNCTION_RODATA_SECTION): Likewise.
        * doc/tm.texi (TARGET_ASM_FUNCTION_RODATA_SECTION): Document.

Also, I noticed that we are currently passing some of the other -function-sections tests
on darwin...


These currently are using dg-skip-if on some targets already (but not darwin).
> r~

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