diff mbox

Fix the rest of PR target/64056

Message ID 20141204141000.GA44742@msticlxl57.ims.intel.com
State New
Headers show

Commit Message

Ilya Enkovich Dec. 4, 2014, 2:45 p.m. UTC
Hi,

This patch adds a check for stpcpy function into gcc.target/i386/chkp-strlen-2.c test.

make check RUNTESTFLAGS="i386.exp=chkp-strlen-2.c" is OK.  OK for trunk?

Thanks,
Ilya
--
2014-12-04  Ilya Enkovich  <ilya.enkovich@intel.com>

	PR target/64056
	* lib/target-supports.exp (check_effective_target_stpcpy): New.
	* gcc.target/i386/chkp-strlen-2.c: Add stpcpy target check.

Comments

Rainer Orth Dec. 4, 2014, 2:58 p.m. UTC | #1
Hi Ilya,


> This patch adds a check for stpcpy function into
> gcc.target/i386/chkp-strlen-2.c test.
>
> make check RUNTESTFLAGS="i386.exp=chkp-strlen-2.c" is OK.  OK for trunk?
>
> Thanks,
> Ilya
> --
> 2014-12-04  Ilya Enkovich  <ilya.enkovich@intel.com>
>
> 	PR target/64056
> 	* lib/target-supports.exp (check_effective_target_stpcpy): New.

new effective-target keywords need documentation in sourcebuild.texi.

	Rainer
diff mbox

Patch

diff --git a/gcc/testsuite/gcc.target/i386/chkp-strlen-2.c b/gcc/testsuite/gcc.target/i386/chkp-strlen-2.c
index 1ce426d..67691ee 100644
--- a/gcc/testsuite/gcc.target/i386/chkp-strlen-2.c
+++ b/gcc/testsuite/gcc.target/i386/chkp-strlen-2.c
@@ -1,5 +1,6 @@ 
 /* { dg-do compile } */
 /* { dg-require-effective-target mpx } */
+/* { dg-require-effective-target stpcpy } */
 /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-strlen" } */
 /* { dg-final { scan-tree-dump-not "strlen" "strlen" } } */
 /* { dg-final { cleanup-tree-dump "strlen" } } */
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index ac04d95..0a911c1 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -5856,6 +5856,12 @@  proc check_effective_target_mempcpy {} {
     return [check_function_available "mempcpy"]
 }
 
+# Returns 1 if "stpcpy" is available on the target system.
+
+proc check_effective_target_stpcpy {} {
+    return [check_function_available "stpcpy"]
+}
+
 # Check whether the vectorizer tests are supported by the target and
 # append additional target-dependent compile flags to DEFAULT_VECTCFLAGS.
 # Set dg-do-what-default to either compile or run, depending on target