Andreas Schwab <sch...@linux-m68k.org> writes: > Rainer Orth <r...@cebitec.uni-bielefeld.de> writes: > >> Indeed, and I see -ansi -pedantic-errors -gdwarf-2 -O0 used for the test >> on both x86_64-unknown-linux-gnu and i386-pc-solaris2.10 (if I augment >> the target clause). > > DEFAULT_CFLAGS is set by many *.exp files. dwarf2.exp will not > overwrite an existing definition, so using anthing different from "-ansi > -pedantic-errors" will not work.
Right, I noticed this myself. Most likely just another one of the many instances of mindless copy-and-paste programming in our testsuite ;-( I've now applied the following patch to fix this, after testing on x86_64-unknown-linux-gnu. Btw., I've started implementing a dwarf2_debug_line effective-target keyword for the testsuite. Rainer 2013-06-07 Rainer Orth <r...@cebitec.uni-bielefeld.de> * gcc.dg/debug/dwarf2/discriminator.c: Fix wording. Revert to dg-options.
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/discriminator.c b/gcc/testsuite/gcc.dg/debug/dwarf2/discriminator.c --- a/gcc/testsuite/gcc.dg/debug/dwarf2/discriminator.c +++ b/gcc/testsuite/gcc.dg/debug/dwarf2/discriminator.c @@ -1,7 +1,7 @@ /* HAVE_AS_DWARF2_DEBUG_LINE macro needs to be defined to pass the unittest. - However, there dg cannot defin it as, so we restrict the target to linux. */ + However, dg cannot access it, so we restrict the target to linux. */ /* { dg-do compile { target *-*-linux-gnu } } */ -/* { dg-additional-options "-O0" } */ +/* { dg-options "-O0 -gdwarf-2" } */ /* { dg-final { scan-assembler "loc \[0-9] 11 \[0-9]( is_stmt \[0-9])?\n" } } */ /* { dg-final { scan-assembler "loc \[0-9] 11 \[0-9]( is_stmt \[0-9])? discriminator 2\n" } } */ /* { dg-final { scan-assembler "loc \[0-9] 11 \[0-9]( is_stmt \[0-9])? discriminator 1\n" } } */
-- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University