]> gcc.gnu.org Git - gcc.git/commitdiff
target-supports.exp (check_profiling_available): Check argument to determine whether...
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>
Sat, 21 Feb 2004 02:58:24 +0000 (02:58 +0000)
committerKaveh Ghazi <ghazi@gcc.gnu.org>
Sat, 21 Feb 2004 02:58:24 +0000 (02:58 +0000)
* 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

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/bprob/bprob.exp
gcc/testsuite/g++.old-deja/g++.law/profile1.C
gcc/testsuite/g77.dg/bprob/bprob.exp
gcc/testsuite/gcc.dg/20021014-1.c
gcc/testsuite/gcc.dg/nest.c
gcc/testsuite/gcc.misc-tests/bprob.exp
gcc/testsuite/lib/gcc-dg.exp
gcc/testsuite/lib/target-supports.exp

index ecf018c794f91a101f6e09300d4c35b9ef86e862..bad926b8ac9bf2553ae334c54c64e22734e21ec2 100644 (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
index bef57836cf1823a5b31452bcacf5ab9b5a0384a6..ea458fa17979be9ba45d781c697652f4358df0ec 100644 (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
 }
 
index 9ca4a91546928f60b0d1928a1b8997ffffdea545..2fa633ba17e8af06689c8e8f2aa8478fb0dad72b 100644 (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
index 6eb45be2e36e09858a11108c767f95dde946ab08..e453f4e66f882777c45696d89628a628040f0ea0 100644 (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
 }
 
index 1e2b76c761430432f4f63ca01f0d8a0e473da36d..67f88ae2f6b7d727e30b549cb26dbe193747fcf9 100644 (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);
index 872feade5810e6567c8f8f9d647df622783fdbf1..264dde26f05f81543d0f0eb108c04352f3ec696c 100644 (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)
index 5afbdb1c847832769e04873f4af06f17fe2a74bf..8fde6829f837be284847d8f4085d329191b75147 100644 (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
 }
 
index c67766793892814efdeafe4385cc3ac0cb36d27b..c5f589eea2709a11f45b1661aa1dc3c3f35f8e20 100644 (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
index 33d72fd9520703ad5b2632cf1d127c68a53205c8..173ce6128d38c428058df3a608ebfd573e538fca 100644 (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.
This page took 0.110871 seconds and 5 git commands to generate.