target-supports.exp (check_profiling_available): Check argument to determine whether we support a profiling type.

* 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.

From-SVN: r78206
This commit is contained in:
Kaveh R. Ghazi 2004-02-21 02:58:24 +00:00 committed by Kaveh Ghazi
parent d220de0ed2
commit 0d856ba2d2
9 changed files with 46 additions and 20 deletions

View File

@ -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

View File

@ -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
}

View File

@ -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

View File

@ -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
}

View File

@ -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);

View File

@ -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)

View File

@ -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
}

View File

@ -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

View File

@ -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.