+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
/* { 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" } } */
/* { 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" } } */
/* { 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" } } */
/* { 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" } } */
/* { 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" } } */
/* { dg-do compile } */
+/* { dg-require-effective-target mpx } */
/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -Wchkp" } */
int test (int *p)
/* { 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" } } */
/* { 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" } } */
/* { 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" } } */
# 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 { } {
--- /dev/null
+# 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"]
+}