diff options
author | Mark Mitchell <mark@codesourcery.com> | 2003-12-23 23:55:06 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2003-12-23 23:55:06 +0000 |
commit | b8ee7f0279afe920c8e5740499bfd0368f8f806b (patch) | |
tree | 85e6485dc17957eec0bed8927a0a464c9f4decad /gcc | |
parent | 7bd35dac2435a177f9891854a0b6b8335c74b3d4 (diff) | |
download | gcc-b8ee7f0279afe920c8e5740499bfd0368f8f806b.zip gcc-b8ee7f0279afe920c8e5740499bfd0368f8f806b.tar.gz gcc-b8ee7f0279afe920c8e5740499bfd0368f8f806b.tar.bz2 |
gcc-dg.exp (dg-require-profiling): New function.
* lib/gcc-dg.exp (dg-require-profiling): New function.
* lib/target-supports.exp (check_profiling_available): Likewise.
* g++.dg/bprob/bprob.exp: Use check_profiling_available.
* g77.dg/bprob/bprob.exp: Likewise.
* gcc.misc-tests/bprob.exp: Likewise.
* g++.old-deja/g++.law/profile1.C: Use dg-require-profiling.
* gcc.dg/20021014-1.c: Likewise.
* gcc.dg/nest.c: Likewise.
From-SVN: r74995
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 11 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/bprob/bprob.exp | 6 | ||||
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.law/profile1.C | 1 | ||||
-rw-r--r-- | gcc/testsuite/g77.dg/bprob/bprob.exp | 6 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/20021014-1.c | 3 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/nest.c | 3 | ||||
-rw-r--r-- | gcc/testsuite/gcc.misc-tests/bprob.exp | 7 | ||||
-rw-r--r-- | gcc/testsuite/lib/gcc-dg.exp | 10 | ||||
-rw-r--r-- | gcc/testsuite/lib/target-supports.exp | 24 |
9 files changed, 53 insertions, 18 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index fea6e36..f1558a7 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,16 @@ 2003-12-23 Mark Mitchell <mark@codesourcery.com> + * lib/gcc-dg.exp (dg-require-profiling): New function. + * lib/target-supports.exp (check_profiling_available): Likewise. + * g++.dg/bprob/bprob.exp: Use check_profiling_available. + * g77.dg/bprob/bprob.exp: Likewise. + * gcc.misc-tests/bprob.exp: Likewise. + * g++.old-deja/g++.law/profile1.C: Use dg-require-profiling. + * gcc.dg/20021014-1.c: Likewise. + * gcc.dg/nest.c: Likewise. + +2003-12-23 Mark Mitchell <mark@codesourcery.com> + * g++.dg/lookup/java1.C: Use -fdollars-in-identifiers when compiling. * g++.dg/lookup/java2.C: Likewise. diff --git a/gcc/testsuite/g++.dg/bprob/bprob.exp b/gcc/testsuite/g++.dg/bprob/bprob.exp index 83a7de9..35bec33 100644 --- a/gcc/testsuite/g++.dg/bprob/bprob.exp +++ b/gcc/testsuite/g++.dg/bprob/bprob.exp @@ -19,11 +19,7 @@ # Some targets don't have any implementation of __bb_init_func or are # missing other needed machinery. -if { [istarget mmix-*-*] - || [istarget arm*-*-elf] - || [istarget strongarm*-*-elf] - || [istarget xscale*-*-elf] - || [istarget cris-*-*] } { +if { ![check_profiling_available] } { return } diff --git a/gcc/testsuite/g++.old-deja/g++.law/profile1.C b/gcc/testsuite/g++.old-deja/g++.law/profile1.C index 24a79b4..0a03bff 100644 --- a/gcc/testsuite/g++.old-deja/g++.law/profile1.C +++ b/gcc/testsuite/g++.old-deja/g++.law/profile1.C @@ -1,4 +1,5 @@ // { dg-do run { xfail m68k-motorola-sysv m88k-motorola-sysv3 mips*-*-* i[3456]86-*-sco3.2v5* } } +// { dg-require-profiling "" } // { dg-options "-pg" } // { dg-options "-pg -static" { target hppa*-*-hpux* } } // GROUPS passed profiling diff --git a/gcc/testsuite/g77.dg/bprob/bprob.exp b/gcc/testsuite/g77.dg/bprob/bprob.exp index 771a7aa..e30234e 100644 --- a/gcc/testsuite/g77.dg/bprob/bprob.exp +++ b/gcc/testsuite/g77.dg/bprob/bprob.exp @@ -19,11 +19,7 @@ # Some targets don't have any implementation of __bb_init_func or are # missing other needed machinery. -if { [istarget mmix-*-*] - || [istarget arm*-*-elf] - || [istarget strongarm*-*-elf] - || [istarget xscale*-*-elf] - || [istarget cris-*-*] } { +if { ![check_profiling_available] } { return } diff --git a/gcc/testsuite/gcc.dg/20021014-1.c b/gcc/testsuite/gcc.dg/20021014-1.c index e6dcf2f..1e2b76c 100644 --- a/gcc/testsuite/gcc.dg/20021014-1.c +++ b/gcc/testsuite/gcc.dg/20021014-1.c @@ -1,7 +1,8 @@ /* { dg-do run } */ +/* { dg-require-profiling "" } */ /* { dg-options "-O2 -p" } */ /* { dg-options "-O2 -p -static" { target hppa*-*-hpux* } } */ -/* { dg-error "profiler" "No profiler support" { target mmix-*-* xstormy16-*-* *-*-windiss } 0 } */ +/* { dg-error "profiler" "No profiler support" { target xstormy16-*-* } 0 } */ /* { dg-error "" "consider using `-pg' instead of `-p' with gprof(1)" { target *-*-freebsd* } 0 } */ /* Support for -p on solaris2 relies on mcrt1.o which comes with the vendor compiler. We cannot reiably predict the directory where the diff --git a/gcc/testsuite/gcc.dg/nest.c b/gcc/testsuite/gcc.dg/nest.c index 4cc058d..872fead 100644 --- a/gcc/testsuite/gcc.dg/nest.c +++ b/gcc/testsuite/gcc.dg/nest.c @@ -1,8 +1,9 @@ /* PR 5967, PR 7114 */ /* { dg-do run } */ +/* { dg-require-profiling "" } */ /* { dg-options "-O2 -pg" } */ /* { dg-options "-O2 -pg -static" { target hppa*-*-hpux* } } */ -/* { dg-error "profiler" "No profiler support" { target mmix-*-* xstormy16-*-* *-*-windiss } 0 } */ +/* { dg-error "profiler" "No profiler support" { target xstormy16-*-* } 0 } */ /* Support for -pg on irix relies on gcrt1.o which doesn't exist yet. See: http://gcc.gnu.org/ml/gcc/2002-10/msg00169.html */ /* { dg-error "gcrt1.o" "Profiler support missing" { target mips*-*-irix* } 0 } */ diff --git a/gcc/testsuite/gcc.misc-tests/bprob.exp b/gcc/testsuite/gcc.misc-tests/bprob.exp index 81a2968..df59900 100644 --- a/gcc/testsuite/gcc.misc-tests/bprob.exp +++ b/gcc/testsuite/gcc.misc-tests/bprob.exp @@ -19,12 +19,7 @@ # Some targets don't have any implementation of __bb_init_func or are # missing other needed machinery. -if { [istarget mmix-*-*] - || [istarget arm*-*-elf] - || [istarget strongarm*-*-elf] - || [istarget xscale*-*-elf] - || [istarget cris-*-*] - || [istarget h8300-*-*] } { +if { ![check_profiling_available] } { return } diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp index f2ba88e..c677667 100644 --- a/gcc/testsuite/lib/gcc-dg.exp +++ b/gcc/testsuite/lib/gcc-dg.exp @@ -321,6 +321,16 @@ proc dg-require-gc-sections { args } { } } +# If this target does not support profiling, skip this test. + +proc dg-require-profiling { args } { + if { ![ check_profiling_available ] } { + upvar dg-do-what dg-do-what + set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"] + return + } +} + # If this target does not support DLL attributes skip this test. proc dg-require-dll { args } { diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index e9a57a1..bff0a4f 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -161,3 +161,27 @@ proc check_gc_sections_available { } { } return $gc_sections_available_saved } + +# Return true if profiling is supported on the target. + +proc check_profiling_available { } { + global profiling_available_saved + + if {![info exists profiling_available_saved]} { + # Some targets don't have any implementation of __bb_init_func or are + # missing other needed machinery. + if { [istarget mmix-*-*] + || [istarget arm*-*-elf] + || [istarget strongarm*-*-elf] + || [istarget xscale*-*-elf] + || [istarget cris-*-*] + || [istarget h8300-*-*] + || [istarget *-*-windiss] } { + set profiling_available_saved 0 + } else { + set profiling_available_saved 1 + } + } + + return $profiling_available_saved +} |