re PR target/69890 (FAIL: gcc.target/i386/chkp-* on x86_64-apple-darwin15)
authorIlya Enkovich <enkovich.gnu@gmail.com>
Fri, 1 Apr 2016 10:40:51 +0000 (10:40 +0000)
committerIlya Enkovich <ienkovich@gcc.gnu.org>
Fri, 1 Apr 2016 10:40:51 +0000 (10:40 +0000)
gcc/testsuite/

PR target/69890
* gcc.dg/strlenopt.h (memmove): New.
* gcc.target/i386/chkp-strlen-1.c: Include "../../gcc.dg/strlenopt.h"
instead of "string.h".
* gcc.target/i386/chkp-strlen-2.c: Likewise.
* gcc.target/i386/chkp-strlen-3.c: Likewise.
* gcc.target/i386/chkp-strlen-4.c: Likewise.
* gcc.target/i386/chkp-strlen-5.c: Likewise.
* gcc.target/i386/chkp-stropt-1.c: Likewise.
* gcc.target/i386/chkp-stropt-10.c: Likewise.
* gcc.target/i386/chkp-stropt-11.c: Likewise.
* gcc.target/i386/chkp-stropt-12.c: Likewise.
* gcc.target/i386/chkp-stropt-13.c: Likewise.
* gcc.target/i386/chkp-stropt-14.c: Likewise.
* gcc.target/i386/chkp-stropt-15.c: Likewise.
* gcc.target/i386/chkp-stropt-16.c: Likewise.
* gcc.target/i386/chkp-stropt-2.c: Likewise.
* gcc.target/i386/chkp-stropt-3.c: Likewise.
* gcc.target/i386/chkp-stropt-4.c: Likewise.
* gcc.target/i386/chkp-stropt-5.c: Likewise.
* gcc.target/i386/chkp-stropt-6.c: Likewise.
* gcc.target/i386/chkp-stropt-7.c: Likewise.
* gcc.target/i386/chkp-stropt-8.c: Likewise.
* gcc.target/i386/chkp-stropt-9.c: Likewise.

From-SVN: r234666

23 files changed:
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/strlenopt.h
gcc/testsuite/gcc.target/i386/chkp-strlen-1.c
gcc/testsuite/gcc.target/i386/chkp-strlen-2.c
gcc/testsuite/gcc.target/i386/chkp-strlen-3.c
gcc/testsuite/gcc.target/i386/chkp-strlen-4.c
gcc/testsuite/gcc.target/i386/chkp-strlen-5.c
gcc/testsuite/gcc.target/i386/chkp-stropt-1.c
gcc/testsuite/gcc.target/i386/chkp-stropt-10.c
gcc/testsuite/gcc.target/i386/chkp-stropt-11.c
gcc/testsuite/gcc.target/i386/chkp-stropt-12.c
gcc/testsuite/gcc.target/i386/chkp-stropt-13.c
gcc/testsuite/gcc.target/i386/chkp-stropt-14.c
gcc/testsuite/gcc.target/i386/chkp-stropt-15.c
gcc/testsuite/gcc.target/i386/chkp-stropt-16.c
gcc/testsuite/gcc.target/i386/chkp-stropt-2.c
gcc/testsuite/gcc.target/i386/chkp-stropt-3.c
gcc/testsuite/gcc.target/i386/chkp-stropt-4.c
gcc/testsuite/gcc.target/i386/chkp-stropt-5.c
gcc/testsuite/gcc.target/i386/chkp-stropt-6.c
gcc/testsuite/gcc.target/i386/chkp-stropt-7.c
gcc/testsuite/gcc.target/i386/chkp-stropt-8.c
gcc/testsuite/gcc.target/i386/chkp-stropt-9.c

index fc7fd586440395deba6f76d95024134d9d55c936..8f6210a5bfadac57c2d56ad7537832a5bd2f14ff 100644 (file)
@@ -1,3 +1,30 @@
+2016-04-01  Ilya Enkovich  <enkovich.gnu@gmail.com>
+
+       PR target/69890
+       * gcc.dg/strlenopt.h (memmove): New.
+       * gcc.target/i386/chkp-strlen-1.c: Include "../../gcc.dg/strlenopt.h"
+       instead of "string.h".
+       * gcc.target/i386/chkp-strlen-2.c: Likewise.
+       * gcc.target/i386/chkp-strlen-3.c: Likewise.
+       * gcc.target/i386/chkp-strlen-4.c: Likewise.
+       * gcc.target/i386/chkp-strlen-5.c: Likewise.
+       * gcc.target/i386/chkp-stropt-1.c: Likewise.
+       * gcc.target/i386/chkp-stropt-10.c: Likewise.
+       * gcc.target/i386/chkp-stropt-11.c: Likewise.
+       * gcc.target/i386/chkp-stropt-12.c: Likewise.
+       * gcc.target/i386/chkp-stropt-13.c: Likewise.
+       * gcc.target/i386/chkp-stropt-14.c: Likewise.
+       * gcc.target/i386/chkp-stropt-15.c: Likewise.
+       * gcc.target/i386/chkp-stropt-16.c: Likewise.
+       * gcc.target/i386/chkp-stropt-2.c: Likewise.
+       * gcc.target/i386/chkp-stropt-3.c: Likewise.
+       * gcc.target/i386/chkp-stropt-4.c: Likewise.
+       * gcc.target/i386/chkp-stropt-5.c: Likewise.
+       * gcc.target/i386/chkp-stropt-6.c: Likewise.
+       * gcc.target/i386/chkp-stropt-7.c: Likewise.
+       * gcc.target/i386/chkp-stropt-8.c: Likewise.
+       * gcc.target/i386/chkp-stropt-9.c: Likewise.
+
 2016-03-31  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
 
        * g++.dg/template/ptrmem30.C (read): Rename to data_read.
index ef47e5ac9ad16e70e4dd6b84d1ae59532cdbfd5d..8f69940b027735ecd1ffeaa8ec47d28f9617c55f 100644 (file)
@@ -10,6 +10,7 @@ void free (void *);
 char *strdup (const char *);
 size_t strlen (const char *);
 void *memcpy (void *__restrict, const void *__restrict, size_t);
+void *memmove (void *, const void *, size_t);
 char *strcpy (char *__restrict, const char *__restrict);
 char *strcat (char *__restrict, const char *__restrict);
 char *strchr (const char *, int);
@@ -31,6 +32,12 @@ memcpy (void *__restrict dest, const void *__restrict src, size_t len)
   return __builtin___memcpy_chk (dest, src, len, bos0 (dest));
 }
 
+extern inline __attribute__((gnu_inline, always_inline, artificial)) void *
+memmove (void *dest, const void *src, size_t len)
+{
+  return __builtin___memmove_chk (dest, src, len, bos0 (dest));
+}
+
 extern inline __attribute__((gnu_inline, always_inline, artificial)) char *
 strcpy (char *__restrict dest, const char *__restrict src)
 {
index de6279f1dfa93543e8e7e66bd015483cf6365418..38d5390062735c92be36aa6548fae8503f064dd2 100644 (file)
@@ -2,7 +2,7 @@
 /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-strlen" } */
 /* { dg-final { scan-tree-dump "memcpy.chkp" "strlen" } } */
 
-#include "string.h"
+#include "../../gcc.dg/strlenopt.h"
 
 char *test (char *str1, char *str2)
 {
index 470ac4715a904f067c76d4f07b6f998ba7de559d..789ebc1f2d896c3c59971aa70deb49a45bbf9e66 100644 (file)
@@ -3,8 +3,8 @@
 /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-strlen" } */
 /* { dg-final { scan-tree-dump-not "strlen" "strlen" } } */
 
-#define _GNU_SOURCE
-#include "string.h"
+#define USE_GNU
+#include "../../gcc.dg/strlenopt.h"
 
 char *test (char *str1, char *str2)
 {
index 311c9a042e04438366eba3c47daa5707931f55d5..276f4127975928860b0fe5fb9c6d5d0ae9d6691d 100644 (file)
@@ -2,7 +2,7 @@
 /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-strlen" } */
 /* { dg-final { scan-tree-dump-times "strlen" 1 "strlen" } } */
 
-#include "string.h"
+#include "../../gcc.dg/strlenopt.h"
 
 size_t test (char *str1, char *str2)
 {
index dbf568b8418d6f11c7f65830f5ebf5cf0d6d3b5f..51ff96028be2bf5803e6568437c24d63e1361e4f 100644 (file)
@@ -3,8 +3,8 @@
 /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-strlen" } */
 /* { dg-final { scan-tree-dump-times "strlen" 1 "strlen" } } */
 
-#define _GNU_SOURCE
-#include "string.h"
+#define USE_GNU
+#include "../../gcc.dg/strlenopt.h"
 
 char * test (char *str1, char *str2)
 {
index e44096cd4290b1eb886c390b31e62e87aad9575c..bbafecc30632064ae7cfb525302764f5bc901da4 100644 (file)
@@ -3,7 +3,7 @@
 /* { dg-final { scan-tree-dump-times "strlen" 2 "strlen" } } */
 /* { dg-final { scan-tree-dump "memcpy" "strlen" } } */
 
-#include "string.h"
+#include "../../gcc.dg/strlenopt.h"
 
 size_t test (char *str1, char *str2)
 {
index 18aa2819cdfc3e19cf90bcdc8213016954ececa7..d6148a87fd18004e57abb0f33956e09b863ae105 100644 (file)
@@ -2,7 +2,7 @@
 /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-nochk-string-functions" } */
 /* { dg-final { scan-tree-dump "memcpy_nochk" "chkpopt" } } */
 
-#include "string.h"
+#include "../../gcc.dg/strlenopt.h"
 
 void test (int *buf1, int *buf2, size_t len)
 {
index 26e9f13a190e21c28d9db3062533b794335290d6..18cff739b017654dad1e6e9a36e4bb004ca0a37a 100644 (file)
@@ -2,7 +2,7 @@
 /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-fast-string-functions" } */
 /* { dg-final { scan-tree-dump-not "memset_nobnd" "chkpopt" } } */
 
-#include "string.h"
+#include "../../gcc.dg/strlenopt.h"
 
 void test (void *buf1, int c, size_t len)
 {
index e84963f11f7ce66fd48ad6b3f7fa15e82add8bf7..c53db6a17e404ebf21c1bf9bcbe71690c890bd3f 100644 (file)
@@ -2,7 +2,7 @@
 /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-fast-string-functions" } */
 /* { dg-final { scan-tree-dump-not "memmove_nobnd" "chkpopt" } } */
 
-#include "string.h"
+#include "../../gcc.dg/strlenopt.h"
 
 void test (void *buf1, void *buf2, size_t len)
 {
index 638810b8be5c38919cd53369a022a6f4f7989484..a076d17cd9a527322d535e18f42580bb278b654d 100644 (file)
@@ -3,8 +3,8 @@
 /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-fast-string-functions" } */
 /* { dg-final { scan-tree-dump-not "mempcpy_nobnd" "chkpopt" } } */
 
-#define _GNU_SOURCE
-#include "string.h"
+#define USE_GNU
+#include "../../gcc.dg/strlenopt.h"
 
 void test (void *buf1, void *buf2, size_t len)
 {
index 3b926b11f830b5d9de415b7ffc241a1cf8c0c5f3..279cae3e5bfce1b7c9a1d9bb4018e9db5c55f3ea 100644 (file)
@@ -2,7 +2,7 @@
 /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-nochk-string-functions -fchkp-use-fast-string-functions" } */
 /* { dg-final { scan-tree-dump "memcpy_nobnd_nochk" "chkpopt" } } */
 
-#include "string.h"
+#include "../../gcc.dg/strlenopt.h"
 
 void test (int *buf1, int *buf2, size_t len)
 {
index a8d000ba1facc7784ad76187cbcdfbae7a1a73de..b810c682569a2faaf23a8bb19d3ee72497c47891 100644 (file)
@@ -2,7 +2,7 @@
 /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-nochk-string-functions -fchkp-use-fast-string-functions" } */
 /* { dg-final { scan-tree-dump "memset_nobnd_nochk" "chkpopt" } } */
 
-#include "string.h"
+#include "../../gcc.dg/strlenopt.h"
 
 void test (int *buf1, int c, size_t len)
 {
index 7c6065657c0d7c2e9ed156bd0e2da8b37e0d23ef..a9a79c1e33033d4c48288687313b3756ce58da90 100644 (file)
@@ -2,7 +2,7 @@
 /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-nochk-string-functions -fchkp-use-fast-string-functions" } */
 /* { dg-final { scan-tree-dump "memmove_nobnd_nochk" "chkpopt" } } */
 
-#include "string.h"
+#include "../../gcc.dg/strlenopt.h"
 
 void test (int *buf1, int *buf2, size_t len)
 {
index b0f43a6880dac3b7b4d6f6bc03f7244dda1d8d41..6ce170c9d68fd8eb4c8f596691cdbf59a6e16c56 100644 (file)
@@ -3,8 +3,8 @@
 /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-nochk-string-functions -fchkp-use-fast-string-functions" } */
 /* { dg-final { scan-tree-dump "mempcpy_nobnd_nochk" "chkpopt" } } */
 
-#define _GNU_SOURCE
-#include "string.h"
+#define USE_GNU
+#include "../../gcc.dg/strlenopt.h"
 
 void test (int *buf1, int *buf2, size_t len)
 {
index cac0feaecbb2999bc49f7b3c724ec183f4a8d8e2..6a0c24ee887d1a6130748fdbd4a2beadd6e0757b 100644 (file)
@@ -2,7 +2,7 @@
 /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-nochk-string-functions" } */
 /* { dg-final { scan-tree-dump "memset_nochk" "chkpopt" } } */
 
-#include "string.h"
+#include "../../gcc.dg/strlenopt.h"
 
 void test (int *buf1, int c, size_t len)
 {
index 72ff3869f7b12c774ded8a018ffcd843eb483d76..310dec77456c7166838e5a099d895ba4cae72d2b 100644 (file)
@@ -2,7 +2,7 @@
 /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-nochk-string-functions" } */
 /* { dg-final { scan-tree-dump "memmove_nochk" "chkpopt" } } */
 
-#include "string.h"
+#include "../../gcc.dg/strlenopt.h"
 
 void test (int *buf1, int *buf2, size_t len)
 {
index 216ed521edb3c44eb3bc077e06a8295a85394b9b..7a30d17b8e65d218663e891887a259115c434858 100644 (file)
@@ -3,8 +3,8 @@
 /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-nochk-string-functions" } */
 /* { dg-final { scan-tree-dump "mempcpy_nochk" "chkpopt" } } */
 
-#define _GNU_SOURCE
-#include "string.h"
+#define USE_GNU
+#include "../../gcc.dg/strlenopt.h"
 
 void test (int *buf1, int *buf2, size_t len)
 {
index 02ad9ccc496bba862f9d7cbd24c1a4eb7d52c37e..39850d62be8ac279de283feed2eebaf941926da1 100644 (file)
@@ -2,7 +2,7 @@
 /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-fast-string-functions" } */
 /* { dg-final { scan-tree-dump "memcpy_nobnd" "chkpopt" } } */
 
-#include "string.h"
+#include "../../gcc.dg/strlenopt.h"
 
 void test (int *buf1, int *buf2, size_t len)
 {
index 6db5d83a0bc735d9c97cc94cdcb23e02a5b7f148..06dcbfb9a25329a544c6a4c5e312caeac3ed4059 100644 (file)
@@ -2,7 +2,7 @@
 /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-fast-string-functions" } */
 /* { dg-final { scan-tree-dump "memset_nobnd" "chkpopt" } } */
 
-#include "string.h"
+#include "../../gcc.dg/strlenopt.h"
 
 void test (int *buf1, int c, size_t len)
 {
index 761e6263d869c53797e1a5ec42d9bbc291d9a60c..40ded068f8e3ae4d5b20227c98bf1a89083cdd4d 100644 (file)
@@ -2,7 +2,7 @@
 /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-fast-string-functions" } */
 /* { dg-final { scan-tree-dump "memmove_nobnd" "chkpopt" } } */
 
-#include "string.h"
+#include "../../gcc.dg/strlenopt.h"
 
 void test (int *buf1, int *buf2, size_t len)
 {
index afde3c92b9fdbf0645709025c4ae66d7f7a7c07b..7e575bb40bbc071dc336b19b2c35f1ffe4ad6944 100644 (file)
@@ -3,8 +3,8 @@
 /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-fast-string-functions" } */
 /* { dg-final { scan-tree-dump "mempcpy_nobnd" "chkpopt" } } */
 
-#define _GNU_SOURCE
-#include "string.h"
+#define USE_GNU
+#include "../../gcc.dg/strlenopt.h"
 
 void test (int *buf1, int *buf2, size_t len)
 {
index b79d09633ddeb0b831f562076fc65b93bccff6f6..bf26874e5a86b83e6f581720253932faeb4d8cab 100644 (file)
@@ -2,7 +2,7 @@
 /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-fast-string-functions" } */
 /* { dg-final { scan-tree-dump-not "memcpy_nobnd" "chkpopt" } } */
 
-#include "string.h"
+#include "../../gcc.dg/strlenopt.h"
 
 void test (void *buf1, void *buf2, size_t len)
 {