This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Testsuite patch: Fix PPC debug-[12].c regressions
- From: Mark Mitchell <mark at codesourcery dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sun, 18 May 2003 12:02:22 -0700
- Subject: Testsuite patch: Fix PPC debug-[12].c regressions
- Reply-to: mark at codesourcery dot com
I believe this patch will fix the regression tester's complains about
debug-[12].c.
gcc.dg/debug.exp and g++.dg/debug.exp looked identical, but there was a
minor difference: the former used -O where the latter used -O2.
Tested on i686-pc-linux-gnu, applied on the mainline.
--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
2003-05-18 Mark Mitchell <mark@codesourcery.com>
* lib/gcc-dg.exp (gcc-dg-debug-runtest): Add opt_opts parameter.
* gcc.dg/debug/debug.exp: Pass opt_opts parameter to
gcc-dg-debug-runtest.
* g++.dg/debug/debug.exp: Pass opt_opts parameter to
gcc-dg-debug-runtest.
Index: g++.dg/debug/debug.exp
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.dg/debug/debug.exp,v
retrieving revision 1.2
diff -c -5 -p -r1.2 debug.exp
*** g++.dg/debug/debug.exp 17 May 2003 22:17:40 -0000 1.2
--- g++.dg/debug/debug.exp 18 May 2003 18:56:21 -0000
*************** load_lib g++-dg.exp
*** 21,30 ****
# Initialize `dg'.
dg-init
# Main loop.
! gcc-dg-debug-runtest g++_target_compile trivial.C \
[lsort [glob -nocomplain $srcdir/$subdir/*.C]]
# All done.
dg-finish
--- 21,30 ----
# Initialize `dg'.
dg-init
# Main loop.
! gcc-dg-debug-runtest g++_target_compile trivial.C [list -O2 -O3] \
[lsort [glob -nocomplain $srcdir/$subdir/*.C]]
# All done.
dg-finish
Index: gcc.dg/debug/debug.exp
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/debug/debug.exp,v
retrieving revision 1.3
diff -c -5 -p -r1.3 debug.exp
*** gcc.dg/debug/debug.exp 17 May 2003 22:17:40 -0000 1.3
--- gcc.dg/debug/debug.exp 18 May 2003 18:56:24 -0000
*************** load_lib gcc-dg.exp
*** 22,31 ****
# Initialize `dg'.
dg-init
# Main loop.
! gcc-dg-debug-runtest gcc_target_compile trivial.c \
[lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]]
# All done.
dg-finish
--- 22,31 ----
# Initialize `dg'.
dg-init
# Main loop.
! gcc-dg-debug-runtest gcc_target_compile trivial.c [list -O -O3] \
[lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]]
# All done.
dg-finish
Index: lib/gcc-dg.exp
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/lib/gcc-dg.exp,v
retrieving revision 1.15
diff -c -5 -p -r1.15 gcc-dg.exp
*** lib/gcc-dg.exp 17 May 2003 22:17:40 -0000 1.15
--- lib/gcc-dg.exp 18 May 2003 18:56:24 -0000
*************** proc gcc-dg-runtest { testcases default-
*** 188,198 ****
dg-test $test $flags ${default-extra-flags}
}
}
}
! proc gcc-dg-debug-runtest { target_compile trivial testcases } {
global srcdir subdir
if ![info exists DEBUG_TORTURE_OPTIONS] {
set DEBUG_TORTURE_OPTIONS ""
foreach type {-gdwarf-2 -gstabs -gstabs+ -gxcoff -gxcoff+ -gcoff} {
--- 188,198 ----
dg-test $test $flags ${default-extra-flags}
}
}
}
! proc gcc-dg-debug-runtest { target_compile trivial opt_opts testcases } {
global srcdir subdir
if ![info exists DEBUG_TORTURE_OPTIONS] {
set DEBUG_TORTURE_OPTIONS ""
foreach type {-gdwarf-2 -gstabs -gstabs+ -gxcoff -gxcoff+ -gcoff} {
*************** proc gcc-dg-debug-runtest { target_compi
*** 201,211 ****
"additional_flags=$type"]
if { ! [string match "*: unknown or unsupported -g option*" \
$comp_output] } {
foreach level {1 "" 3} {
lappend DEBUG_TORTURE_OPTIONS [list "${type}${level}"]
! foreach opt { -O2 -O3 } {
lappend DEBUG_TORTURE_OPTIONS \
[list "${type}${level}" "$opt" ]
}
}
}
--- 201,211 ----
"additional_flags=$type"]
if { ! [string match "*: unknown or unsupported -g option*" \
$comp_output] } {
foreach level {1 "" 3} {
lappend DEBUG_TORTURE_OPTIONS [list "${type}${level}"]
! foreach opt $opt_opts {
lappend DEBUG_TORTURE_OPTIONS \
[list "${type}${level}" "$opt" ]
}
}
}