diff options
author | Ilya Enkovich <enkovich.gnu@gmail.com> | 2016-04-01 10:40:51 +0000 |
---|---|---|
committer | Ilya Enkovich <ienkovich@gcc.gnu.org> | 2016-04-01 10:40:51 +0000 |
commit | 4afdcfaa6f925047857feebc13d50a4583a75eb0 (patch) | |
tree | 2592670130880aaba89e1e47c9ef06d16ad1b1b8 | |
parent | dad820dfa4f01d208009286d66f9ade4e46d7460 (diff) | |
download | gcc-4afdcfaa6f925047857feebc13d50a4583a75eb0.zip gcc-4afdcfaa6f925047857feebc13d50a4583a75eb0.tar.gz gcc-4afdcfaa6f925047857feebc13d50a4583a75eb0.tar.bz2 |
re PR target/69890 (FAIL: gcc.target/i386/chkp-* on x86_64-apple-darwin15)
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, 61 insertions, 27 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index fc7fd58..8f6210a 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -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. diff --git a/gcc/testsuite/gcc.dg/strlenopt.h b/gcc/testsuite/gcc.dg/strlenopt.h index ef47e5a..8f69940 100644 --- a/gcc/testsuite/gcc.dg/strlenopt.h +++ b/gcc/testsuite/gcc.dg/strlenopt.h @@ -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) { diff --git a/gcc/testsuite/gcc.target/i386/chkp-strlen-1.c b/gcc/testsuite/gcc.target/i386/chkp-strlen-1.c index de6279f..38d5390 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-strlen-1.c +++ b/gcc/testsuite/gcc.target/i386/chkp-strlen-1.c @@ -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) { diff --git a/gcc/testsuite/gcc.target/i386/chkp-strlen-2.c b/gcc/testsuite/gcc.target/i386/chkp-strlen-2.c index 470ac47..789ebc1 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-strlen-2.c +++ b/gcc/testsuite/gcc.target/i386/chkp-strlen-2.c @@ -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) { diff --git a/gcc/testsuite/gcc.target/i386/chkp-strlen-3.c b/gcc/testsuite/gcc.target/i386/chkp-strlen-3.c index 311c9a0..276f412 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-strlen-3.c +++ b/gcc/testsuite/gcc.target/i386/chkp-strlen-3.c @@ -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) { diff --git a/gcc/testsuite/gcc.target/i386/chkp-strlen-4.c b/gcc/testsuite/gcc.target/i386/chkp-strlen-4.c index dbf568b..51ff960 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-strlen-4.c +++ b/gcc/testsuite/gcc.target/i386/chkp-strlen-4.c @@ -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) { diff --git a/gcc/testsuite/gcc.target/i386/chkp-strlen-5.c b/gcc/testsuite/gcc.target/i386/chkp-strlen-5.c index e44096c..bbafecc 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-strlen-5.c +++ b/gcc/testsuite/gcc.target/i386/chkp-strlen-5.c @@ -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) { diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-1.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-1.c index 18aa281..d6148a8 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-1.c +++ b/gcc/testsuite/gcc.target/i386/chkp-stropt-1.c @@ -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) { diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-10.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-10.c index 26e9f13..18cff73 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-10.c +++ b/gcc/testsuite/gcc.target/i386/chkp-stropt-10.c @@ -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) { diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-11.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-11.c index e84963f..c53db6a 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-11.c +++ b/gcc/testsuite/gcc.target/i386/chkp-stropt-11.c @@ -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) { diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-12.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-12.c index 638810b8..a076d17 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-12.c +++ b/gcc/testsuite/gcc.target/i386/chkp-stropt-12.c @@ -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) { diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-13.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-13.c index 3b926b1..279cae3 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-13.c +++ b/gcc/testsuite/gcc.target/i386/chkp-stropt-13.c @@ -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) { diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-14.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-14.c index a8d000b..b810c68 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-14.c +++ b/gcc/testsuite/gcc.target/i386/chkp-stropt-14.c @@ -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) { diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-15.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-15.c index 7c606565..a9a79c1 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-15.c +++ b/gcc/testsuite/gcc.target/i386/chkp-stropt-15.c @@ -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) { diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-16.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-16.c index b0f43a6..6ce170c 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-16.c +++ b/gcc/testsuite/gcc.target/i386/chkp-stropt-16.c @@ -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) { diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-2.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-2.c index cac0fea..6a0c24e 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-2.c +++ b/gcc/testsuite/gcc.target/i386/chkp-stropt-2.c @@ -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) { diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-3.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-3.c index 72ff386..310dec7 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-3.c +++ b/gcc/testsuite/gcc.target/i386/chkp-stropt-3.c @@ -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) { diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-4.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-4.c index 216ed52..7a30d17 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-4.c +++ b/gcc/testsuite/gcc.target/i386/chkp-stropt-4.c @@ -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) { diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-5.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-5.c index 02ad9cc..39850d6 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-5.c +++ b/gcc/testsuite/gcc.target/i386/chkp-stropt-5.c @@ -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) { diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-6.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-6.c index 6db5d83..06dcbfb 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-6.c +++ b/gcc/testsuite/gcc.target/i386/chkp-stropt-6.c @@ -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) { diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-7.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-7.c index 761e626..40ded06 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-7.c +++ b/gcc/testsuite/gcc.target/i386/chkp-stropt-7.c @@ -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) { diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-8.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-8.c index afde3c9..7e575bb 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-8.c +++ b/gcc/testsuite/gcc.target/i386/chkp-stropt-8.c @@ -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) { diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-9.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-9.c index b79d096..bf26874 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-9.c +++ b/gcc/testsuite/gcc.target/i386/chkp-stropt-9.c @@ -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) { |