target-supports.exp (check_effective_target_fstack_protector): New.
authorEric Christopher <echristo@gcc.gnu.org>
Wed, 28 Mar 2007 23:08:26 +0000 (23:08 +0000)
committerEric Christopher <echristo@gcc.gnu.org>
Wed, 28 Mar 2007 23:08:26 +0000 (23:08 +0000)
2007-03-28  Eric Christopher  <echristo@apple.com>

        * lib/target-supports.exp (check_effective_target_fstack_protector): New.
        * gcc.dg/ssp-1.c: Use.
        * gcc.dg/ssp-2.c: Ditto.

From-SVN: r123314

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/ssp-1.c
gcc/testsuite/gcc.dg/ssp-2.c
gcc/testsuite/lib/target-supports.exp

index 9b5244e..a869fb6 100644 (file)
@@ -1,3 +1,9 @@
+2007-03-28  Eric Christopher  <echristo@apple.com>
+
+       * lib/target-supports.exp (check_effective_target_fstack_protector): New.
+       * gcc.dg/ssp-1.c: Use.
+       * gcc.dg/ssp-2.c: Ditto.
+
 2007-03-28  Simon Martin  <simartin@users.sourceforge.net>
 
        PR c++/29077
@@ -25,7 +31,7 @@
 
        PR c++/29993
        * g++.dg/other/cv_func2.C: New.
-       
+
 2007-03-27  Janis Johnson  <janis187@us.ibm.com>
 
        * gcc.dg/dfp/func-vararg-alternate.h: New file.
@@ -36,7 +42,7 @@
        * gcc.dg/dfp/func-vararg-mixed.c: Add optional debugging output.
        * gcc.dg/dfp/func-vararg-dfp.c: Ditto.
 
-       * gcc.dg/dfp/operator-cond.c: Call init, fix typo.      
+       * gcc.dg/dfp/operator-cond.c: Call init, fix typo.
 
        * lib/compat.exp (compat-execute): Fix processing of file names.
 
@@ -57,7 +63,7 @@
        * g++.dg/warn/pragma-system_header1.C: New test.
        * g++.dg/warn/pragma-system_header2.C: New test.
        * g++.dg/warn/pragma-system_header1.h. New.
-       * g++.dg/warn/pragma-system_header2.h. New.     
+       * g++.dg/warn/pragma-system_header2.h. New.
 
 2007-03-26  Ian Lance Taylor  <iant@google.com>
 
        * gcc.dg/float-range-1.c: Update. Test for a warning.
        * gcc.dg/float-range-3.c: New.
        * gcc.dg/float-range-5.c: New.
-       
+
 2007-03-22  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
 
        PR fortran/31262
        * g++.old-deja/g++.eh/cleanup1.C: Likewise.
        * g++.old-deja/g++.bob/template3.C: Likewise.
        * g++.old-deja/g++.bob/inherit1.C: Likewise.
-       
+
 2007-03-22  Paul Thomas  <pault@gcc.gnu.org>
 
        PR fortran/31193
 
        * gcc.dg/vect/no-tree-dom-vect-bug.c: New test.
        * gcc.dg/vect/vect.exp: Compile tests with -fno-tree-dominator-opts.
+
 2007-03-17  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
 
        PR fortran/31120
        * g++.dg/warn/Wconversion-real.C: New.
        * g++.dg/warn/Wconversion-real-integer.C: New.
        * g++.dg/warn/conv2.C: Updated.
-       
+
 2007-03-16  Richard Sandiford  <richard@codesourcery.com>
 
        * gcc.dg/intmax_t-1.c: Restrict XFAIL to VxWorks kernels;
 
        PR c++/30891
        * g++.dg/parse/namespace-definition.C: New.
-       
+
 2007-03-15  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
 
        PR c++/24924
        * g++.dg/cpp/pedantic-errors.C: New.
        * g++.dg/cpp/permissive.C: New.
-       
+
 2007-03-15  Richard Sandiford  <richard@codesourcery.com>
 
        * g++.dg/opt/mmx1.C: Only use the PIC options for fpic targets.
index c839a5d..e71522b 100644 (file)
@@ -1,5 +1,7 @@
 /* { dg-do run { target native } } */
 /* { dg-options "-fstack-protector" } */
+/* { dg-require-effective-target fstack_protector } */
+
 #include <stdlib.h>
 
 static void
index 7a5804c..493f3c9 100644 (file)
@@ -1,5 +1,7 @@
 /* { dg-do run { target native } } */
 /* { dg-options "-fstack-protector" } */
+/* { dg-require-effective-target fstack_protector } */
+
 #include <stdlib.h>
 
 void
index f5066d7..47e6ba9 100644 (file)
@@ -491,6 +491,14 @@ proc check_effective_target_fopenmp {} {
     } "-fopenmp"]
 }
 
+# Return 1 if the target supports -fstack-protector
+
+proc check_effective_target_fstack_protector {} {
+    return [check_no_compiler_messages fstack_protector assembly {
+        void foo (void) { }
+    } "-fstack-protector"]
+}
+
 # Return 1 if compilation with -freorder-blocks-and-partition is error-free
 # for trivial code, 0 otherwise.