diff options
-rw-r--r-- | gcc/testsuite/ChangeLog | 14 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/bprob/bprob.exp | 2 | ||||
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.law/profile1.C | 4 | ||||
-rw-r--r-- | gcc/testsuite/g77.dg/bprob/bprob.exp | 2 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/20021014-1.c | 10 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/nest.c | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.misc-tests/bprob.exp | 2 | ||||
-rw-r--r-- | gcc/testsuite/lib/gcc-dg.exp | 2 | ||||
-rw-r--r-- | gcc/testsuite/lib/target-supports.exp | 25 |
9 files changed, 46 insertions, 20 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index ecf018c794f..bad926b8ac9 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,17 @@ +2004-02-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> + + * lib/target-supports.exp (check_profiling_available): Check + argument to determine whether we support a profiling type. + * lib/gcc-dg.exp (dg-require-profiling): Pass argument to + check_profiling_available. + * g++.dg/bprob/bprob.exp: Likewise + * g77.dg/bprob/bprob.exp: Likewise. + * gcc.misc-tests/bprob.exp: Likewise. + * g++.old-deja/g++.law/profile1.C: Pass profiling type to + dg-require-profiling and delete expected error handling. + * gcc.dg/20021014-1.c: Likewise. + * gcc.dg/nest.c: Likewise. + 2004-02-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca> PR c++/12007 diff --git a/gcc/testsuite/g++.dg/bprob/bprob.exp b/gcc/testsuite/g++.dg/bprob/bprob.exp index bef57836cf1..ea458fa1797 100644 --- a/gcc/testsuite/g++.dg/bprob/bprob.exp +++ b/gcc/testsuite/g++.dg/bprob/bprob.exp @@ -21,7 +21,7 @@ load_lib target-supports.exp # Some targets don't have any implementation of __bb_init_func or are # missing other needed machinery. -if { ![check_profiling_available] } { +if { ![check_profiling_available "-fprofile-arcs"] } { return } diff --git a/gcc/testsuite/g++.old-deja/g++.law/profile1.C b/gcc/testsuite/g++.old-deja/g++.law/profile1.C index 9ca4a915469..2fa633ba17e 100644 --- a/gcc/testsuite/g++.old-deja/g++.law/profile1.C +++ b/gcc/testsuite/g++.old-deja/g++.law/profile1.C @@ -1,5 +1,5 @@ -// { dg-do run { xfail mips*-*-* i[3456]86-*-sco3.2v5* } } -// { dg-require-profiling "" } +// { dg-do run { xfail i[3456]86-*-sco3.2v5* } } +// { dg-require-profiling "-pg" } // { 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 6eb45be2e36..e453f4e66f8 100644 --- a/gcc/testsuite/g77.dg/bprob/bprob.exp +++ b/gcc/testsuite/g77.dg/bprob/bprob.exp @@ -21,7 +21,7 @@ load_lib target-supports.exp # Some targets don't have any implementation of __bb_init_func or are # missing other needed machinery. -if { ![check_profiling_available] } { +if { ![check_profiling_available "-fprofile-arcs"] } { return } diff --git a/gcc/testsuite/gcc.dg/20021014-1.c b/gcc/testsuite/gcc.dg/20021014-1.c index 1e2b76c7614..67f88ae2f6b 100644 --- a/gcc/testsuite/gcc.dg/20021014-1.c +++ b/gcc/testsuite/gcc.dg/20021014-1.c @@ -1,17 +1,9 @@ /* { dg-do run } */ -/* { dg-require-profiling "" } */ +/* { dg-require-profiling "-p" } */ /* { dg-options "-O2 -p" } */ /* { dg-options "-O2 -p -static" { target hppa*-*-hpux* } } */ /* { 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 - vendor compiler (and thus mcrt1.o) is installed so we can't - necessarily find mcrt1.o even if we have it. */ -/* { dg-error "mcrt1.o" "Optional vendor profiler support missing" { target *-*-solaris2* } 0 } */ -/* Support for -p on irix relies on libprof1.a which doesn't appear to - exist on any irix6 system currently posting testsuite results. */ -/* { dg-error "libprof1.a" "Profiler support missing" { target mips*-*-irix* } 0 } */ extern void abort (void); extern void exit (int); diff --git a/gcc/testsuite/gcc.dg/nest.c b/gcc/testsuite/gcc.dg/nest.c index 872feade581..264dde26f05 100644 --- a/gcc/testsuite/gcc.dg/nest.c +++ b/gcc/testsuite/gcc.dg/nest.c @@ -1,12 +1,9 @@ /* PR 5967, PR 7114 */ /* { dg-do run } */ -/* { dg-require-profiling "" } */ +/* { dg-require-profiling "-pg" } */ /* { dg-options "-O2 -pg" } */ /* { dg-options "-O2 -pg -static" { target hppa*-*-hpux* } } */ /* { 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 } */ /* { dg-error "-pg not supported" "Profiler support missing" { target *-*-sco3.2v5* } 0 } */ long foo (long x) diff --git a/gcc/testsuite/gcc.misc-tests/bprob.exp b/gcc/testsuite/gcc.misc-tests/bprob.exp index 5afbdb1c847..8fde6829f83 100644 --- a/gcc/testsuite/gcc.misc-tests/bprob.exp +++ b/gcc/testsuite/gcc.misc-tests/bprob.exp @@ -21,7 +21,7 @@ load_lib target-supports.exp # Some targets don't have any implementation of __bb_init_func or are # missing other needed machinery. -if { ![check_profiling_available] } { +if { ![check_profiling_available "-fprofile-arcs"] } { return } diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp index c6776679389..c5f589eea27 100644 --- a/gcc/testsuite/lib/gcc-dg.exp +++ b/gcc/testsuite/lib/gcc-dg.exp @@ -324,7 +324,7 @@ 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 ] } { + if { ![ check_profiling_available ${args} ] } { upvar dg-do-what dg-do-what set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"] return diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 33d72fd9520..173ce6128d3 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -166,9 +166,32 @@ proc check_gc_sections_available { } { # Return true if profiling is supported on the target. -proc check_profiling_available { } { +proc check_profiling_available { test_what } { global profiling_available_saved + verbose "Profiling argument is <$test_what>" 1 + + # These conditions depend on the argument so examine them before + # looking at the cache variable. + + # Support for -p on solaris2 relies on mcrt1.o which comes with the + # vendor compiler. We cannot reliably predict the directory where the + # vendor compiler (and thus mcrt1.o) is installed so we can't + # necessarily find mcrt1.o even if we have it. + if { [istarget *-*-solaris2*] && [lindex $test_what 1] == "-p" } { + return 0 + } + + # Support for -p on irix relies on libprof1.a which doesn't appear to + # exist on any irix6 system currently posting testsuite results. + # 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 + if { [istarget mips*-*-irix*] + && ([lindex $test_what 1] == "-p" || [lindex $test_what 1] == "-pg") } { + return 0 + } + + # Now examine the cache variable. if {![info exists profiling_available_saved]} { # Some targets don't have any implementation of __bb_init_func or are # missing other needed machinery. |