mpx-dg.exp: New.
authorIlya Enkovich <ilya.enkovich@intel.com>
Thu, 6 Nov 2014 09:44:05 +0000 (09:44 +0000)
committerIlya Enkovich <ienkovich@gcc.gnu.org>
Thu, 6 Nov 2014 09:44:05 +0000 (09:44 +0000)
gcc/testsuite/

* lib/mpx-dg.exp: New.
* gcc.target/i386/i386.exp: Load mpx-dg.exp.
* gcc.target/i386/chkp-builtins-1.c: Require mpx target.
* gcc.target/i386/chkp-builtins-2.c: Likewise.
* gcc.target/i386/chkp-builtins-3.c: Likewise.
* gcc.target/i386/chkp-builtins-4.c: Likewise.
* gcc.target/i386/chkp-const-check-1.c: Likewise.
* gcc.target/i386/chkp-const-check-2.c: Likewise.
* gcc.target/i386/chkp-lifetime-1.c: Likewise.
* gcc.target/i386/chkp-remove-bndint-1.c: Likewise.
* gcc.target/i386/chkp-remove-bndint-2.c: Likewise.

From-SVN: r217180

12 files changed:
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/chkp-builtins-1.c
gcc/testsuite/gcc.target/i386/chkp-builtins-2.c
gcc/testsuite/gcc.target/i386/chkp-builtins-3.c
gcc/testsuite/gcc.target/i386/chkp-builtins-4.c
gcc/testsuite/gcc.target/i386/chkp-const-check-1.c
gcc/testsuite/gcc.target/i386/chkp-const-check-2.c
gcc/testsuite/gcc.target/i386/chkp-lifetime-1.c
gcc/testsuite/gcc.target/i386/chkp-remove-bndint-1.c
gcc/testsuite/gcc.target/i386/chkp-remove-bndint-2.c
gcc/testsuite/gcc.target/i386/i386.exp
gcc/testsuite/lib/mpx-dg.exp [new file with mode: 0644]

index 5c8e8c1f728f488acd5075be4aa81f2326a31ab6..b40df261fea0145304f7f83519d2a4fd6b27754c 100644 (file)
@@ -1,3 +1,17 @@
+2014-11-06  Ilya Enkovich  <ilya.enkovich@intel.com>
+
+       * lib/mpx-dg.exp: New.
+       * gcc.target/i386/i386.exp: Load mpx-dg.exp.
+       * gcc.target/i386/chkp-builtins-1.c: Require mpx target.
+       * gcc.target/i386/chkp-builtins-2.c: Likewise.
+       * gcc.target/i386/chkp-builtins-3.c: Likewise.
+       * gcc.target/i386/chkp-builtins-4.c: Likewise.
+       * gcc.target/i386/chkp-const-check-1.c: Likewise.
+       * gcc.target/i386/chkp-const-check-2.c: Likewise.
+       * gcc.target/i386/chkp-lifetime-1.c: Likewise.
+       * gcc.target/i386/chkp-remove-bndint-1.c: Likewise.
+       * gcc.target/i386/chkp-remove-bndint-2.c: Likewise.
+
 2014-11-06  Richard Biener  <rguenther@suse.de>
 
        * gcc.dg/tree-ssa/forwprop-28.c: Adjust scanning for the
index bcc1198b5b1def0472145cd7ee68ce4971a5ac25..2acc087e62ad0ef8318aa511baba49c96541c8e6 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-require-effective-target mpx } */
 /* { dg-options "-fcheck-pointer-bounds -mmpx -fdump-tree-chkp" } */
 /* { dg-final { scan-tree-dump-not "bnd_init_ptr_bounds" "chkp" } } */
 
index 1f4a244ee92dd1d854a73cff36108bad79e80d02..dc62238c5bd87fea3fc4e8024a74dab0f707100f 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-require-effective-target mpx } */
 /* { dg-options "-fcheck-pointer-bounds -mmpx -fdump-tree-chkp" } */
 /* { dg-final { scan-tree-dump-not "bnd_copy_ptr_bounds" "chkp" } } */
 
index ea54ede3c5784faa78615f15b6571e13a9dffd97..055f0ed07d965257d5ec73ce4f9b51889e775d98 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-require-effective-target mpx } */
 /* { dg-options "-fcheck-pointer-bounds -mmpx -fdump-tree-chkp" } */
 /* { dg-final { scan-tree-dump-not "bnd_set_ptr_bounds" "chkp" } } */
 
index cee780b2371ff349d66e5dcf1dabc76af6f49d2e..434df78ac34e55d86747aa0adce356e7d16e6d61 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-require-effective-target mpx } */
 /* { dg-options "-fcheck-pointer-bounds -mmpx -fdump-tree-chkp" } */
 /* { dg-final { scan-tree-dump-not "bnd_null_ptr_bounds" "chkp" } } */
 
index 2cd5af1f626368d36f00d930df77dc66a1d99953..53e0828951623b36a46d715a8e08903929eccb16 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-require-effective-target mpx } */
 /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt" } */
 /* { dg-final { scan-tree-dump-not "bndcl" "chkpopt" } } */
 /* { dg-final { scan-tree-dump-not "bndcu" "chkpopt" } } */
index 98497f958a1b07afa29c9332ddb0fd7f88120350..18e497a0b92aee3dda571fec67b8f8fb12a27687 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-require-effective-target mpx } */
 /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -Wchkp" } */
 
 int test (int *p)
index bcecdd032c1310a1a3124f5f8cf491575392d31f..5ceaa8e46214ff16beb2e5d82df2ea9b16269136 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-require-effective-target mpx } */
 /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt-details" } */
 /* { dg-final { scan-tree-dump "Moving creation of \[^ \]+ down to its use" "chkpopt" } } */
 
index db710041f87e1d1eb50ee8b58f499d73a96b831d..377f5c47164d55aa2d7bb15046489c2d281b0507 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-require-effective-target mpx } */
 /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-optimized" } */
 /* { dg-final { scan-tree-dump-not "bndint" "optimized" } } */
 
index c97ac2778931ca11269bed316ae3d535f5578c56..3547035785edbda69426fbb0a2f1e7dd047ca8ab 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-require-effective-target mpx } */
 /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-optimized -Wchkp" } */
 /* { dg-final { scan-tree-dump-not "bndint" "optimized" } } */
 
index 493a1f425e5378539ac059ef0260bc3d32d95684..4fcb8a6ab5e9bb01e9cc84a48080b2436b884f9e 100644 (file)
@@ -24,6 +24,7 @@ if { ![istarget i?86*-*-*] && ![istarget x86_64-*-*] } then {
 # Load support procs.
 load_lib gcc-dg.exp
 load_lib clearcap.exp
+load_lib mpx-dg.exp
 
 # Return 1 if attribute ms_hook_prologue is supported.
 proc check_effective_target_ms_hook_prologue { } {
diff --git a/gcc/testsuite/lib/mpx-dg.exp b/gcc/testsuite/lib/mpx-dg.exp
new file mode 100644 (file)
index 0000000..de7eba8
--- /dev/null
@@ -0,0 +1,24 @@
+# Copyright (C) 2014 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3.  If not see
+# <http://www.gnu.org/licenses/>.
+
+# Return 1 if compilation with "-fcheck-pointer-bounds -mmpx" is
+# error-free for trivial code, 0 otherwise.
+
+proc check_effective_target_mpx {} {
+    return [check_no_compiler_messages mpx object {
+       int *foo (int *arg) { return arg; }
+    } "-fcheck-pointer-bounds -mmpx"]
+}