Commit 5141543000fc86a3d49a907a2313713ee79e504d

Anthony Green 2013-01-10T07:35:53

Don't run EH tests with non-GNU compiler

diff --git a/ChangeLog b/ChangeLog
index 0df4203..1086505 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2013-01-10  Anthony Green  <green@moxielogic.com>
 
+	* testsuite/libffi.special/special.exp: Only run exception
+	handling tests when using GNU compiler.
+
 	* m4/ax_compiler_vendor.m4: New file.
 	* configure.ac: Test for compiler vendor and don't use
 	AX_CFLAGS_WARN_ALL with the sun compiler.
diff --git a/testsuite/libffi.special/special.exp b/testsuite/libffi.special/special.exp
index 74671b1..f1a5fa6 100644
--- a/testsuite/libffi.special/special.exp
+++ b/testsuite/libffi.special/special.exp
@@ -23,10 +23,14 @@ global cxx_options
 
 set cxx_options " -shared-libgcc -lstdc++"
 
-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.cc]] $cxx_options "-O0 -W -Wall"
-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.cc]] $cxx_options "-O2"
-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.cc]] $cxx_options "-O3"
-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.cc]] $cxx_options "-Os"
+if { [string match $using_gcc "yes"] } {
+
+  dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.cc]] $cxx_options "-O0 -W -Wall"
+  dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.cc]] $cxx_options "-O2"
+  dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.cc]] $cxx_options "-O3"
+  dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.cc]] $cxx_options "-Os"
+
+}
 
 dg-finish