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]

[Patch, testsuite] Add -gdwarf to debug/dwarf2 testcases (Take 2)

This patch adds -gdwarf to the flags passed to all tests run by
dwarf2.exp. In the first attempt, I'd added the flag to dg-options in
individual testcases. Jakub then suggested adding it to the exp file

Does this look ok? If yes, could someone commit please, I don't have
commit access.



2013-04-29  Senthil Kumar Selvaraj <>

	* gcc.dg/debug/dwarf2/dwarf2.exp: Replace -gdwarf-2 with -gdwarf and
	force -gdwarf when invoking dg-runtest.

diff --git gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2.exp gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2.exp
index 829840c..f161787 100644
--- gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2.exp
+++ gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2.exp
@@ -22,7 +22,7 @@ load_lib gcc-dg.exp
 # If a testcase doesn't have special options, use these.
 if ![info exists DEFAULT_CFLAGS] then {
-    set DEFAULT_CFLAGS " -ansi -pedantic-errors -gdwarf-2"
+    set DEFAULT_CFLAGS " -ansi -pedantic-errors"
 # Initialize `dg'.
@@ -31,12 +31,12 @@ dg-init
 # Main loop.
 set comp_output [gcc_target_compile \
     "$srcdir/$subdir/../trivial.c" "trivial.S" assembly \
-    "additional_flags=-gdwarf-2"]
+    "additional_flags=-gdwarf"]
 if { ! [string match "*: target system does not support the * debug format*" \
     $comp_output] } {
     remove-build-file "trivial.S"
     dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\] $srcdir/c-c++-common/dwarf2/*.c]] \
+	    " -gdwarf " $DEFAULT_CFLAGS
 # All done.

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