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
This commit is contained in:
Ilya Enkovich 2016-04-01 10:40:51 +00:00 committed by Ilya Enkovich
parent dad820dfa4
commit 4afdcfaa6f
23 changed files with 61 additions and 27 deletions

View 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.

View 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)
{

View 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)
{

View 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)
{

View 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)
{

View 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)
{

View 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)
{

View 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)
{

View 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)
{

View 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)
{

View 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)
{

View 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)
{

View 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)
{

View 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)
{

View 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)
{

View 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)
{

View 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)
{

View 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)
{

View 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)
{

View 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)
{

View 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)
{

View 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)
{

View 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)
{