OSDN Git Service

* lib/target-supports.exp (check_profiling_available): Check
authorghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 21 Feb 2004 02:58:24 +0000 (02:58 +0000)
committerghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 21 Feb 2004 02:58:24 +0000 (02:58 +0000)
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@78206 138bc75d-0d04-0410-961f-82ee72b054a4

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 ecf018c..bad926b 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 bef5783..ea458fa 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 9ca4a91..2fa633b 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 6eb45be..e453f4e 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 1e2b76c..67f88ae 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 872fead..264dde2 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 5afbdb1..8fde682 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 c677667..c5f589e 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 33d72fd..173ce61 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.