From 22b98f356efeed60cb90d5be33f613dcf6e2acff Mon Sep 17 00:00:00 2001 From: Kai Tietz Date: Fri, 25 Apr 2008 08:40:10 +0000 Subject: [PATCH] array-quals-1.c: Add xfail for x86_64-*-mingw*. 2008-04-25 Kai Tietz * gcc.dg/array-quals-1.c: Add xfail for x86_64-*-mingw*. * gcc.dg/builtins-12.c: Add dg-options "-ansi". * gcc.dg/builtins-13.c: Likewise. * gcc.dg/pr25682.c: Likewise. * gcc.dg/pr33694.c: Likewise. * gcc.dg/c90-const-expr-2.c: Add check for _WIN64 define. * gcc.dg/c99-const-expr-2.c: Likewise. * gcc.dg/ia64-sync-1.c: Add typedef of size_t, for prototype. * gcc.dg/ia64-sync-2.c: Likewise. * gcc.dg/ia64-sync-3.c: Likewise * gcc.dg/large-size-array.c: Add check for _WIN64 define. * gcc.dg/large-size-array-3.c: Likewise. * gcc.dg/large-size-array-2.c: Add x86_64-*-mingw* for ignore error check. * gcc.dg/large-size-array-4.c: Likewise. * gcc.dg/max-1.c: Replace use of long by ssize_t. From-SVN: r134659 --- gcc/testsuite/ChangeLog | 19 +++++++++++++++++++ gcc/testsuite/gcc.dg/array-quals-1.c | 2 +- gcc/testsuite/gcc.dg/builtins-12.c | 1 + gcc/testsuite/gcc.dg/builtins-13.c | 1 + gcc/testsuite/gcc.dg/c90-const-expr-2.c | 2 +- gcc/testsuite/gcc.dg/c99-const-expr-2.c | 2 +- gcc/testsuite/gcc.dg/ia64-sync-1.c | 4 +++- gcc/testsuite/gcc.dg/ia64-sync-2.c | 4 +++- gcc/testsuite/gcc.dg/ia64-sync-3.c | 4 +++- gcc/testsuite/gcc.dg/large-size-array-2.c | 2 +- gcc/testsuite/gcc.dg/large-size-array-3.c | 2 +- gcc/testsuite/gcc.dg/large-size-array-4.c | 2 +- gcc/testsuite/gcc.dg/large-size-array.c | 2 +- gcc/testsuite/gcc.dg/max-1.c | 17 +++++++++++------ gcc/testsuite/gcc.dg/pr25682.c | 1 + gcc/testsuite/gcc.dg/pr33694.c | 1 + 16 files changed, 50 insertions(+), 16 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 71bf3e00745..526adbaad50 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,22 @@ +2008-04-25 Kai Tietz + + * gcc.dg/array-quals-1.c: Add xfail for x86_64-*-mingw*. + * gcc.dg/builtins-12.c: Add dg-options "-ansi". + * gcc.dg/builtins-13.c: Likewise. + * gcc.dg/pr25682.c: Likewise. + * gcc.dg/pr33694.c: Likewise. + * gcc.dg/c90-const-expr-2.c: Add check for _WIN64 define. + * gcc.dg/c99-const-expr-2.c: Likewise. + * gcc.dg/ia64-sync-1.c: Add typedef of size_t, for prototype. + * gcc.dg/ia64-sync-2.c: Likewise. + * gcc.dg/ia64-sync-3.c: Likewise + * gcc.dg/large-size-array.c: Add check for _WIN64 define. + * gcc.dg/large-size-array-3.c: Likewise. + * gcc.dg/large-size-array-2.c: Add x86_64-*-mingw* for ignore error + check. + * gcc.dg/large-size-array-4.c: Likewise. + * gcc.dg/max-1.c: Replace use of long by ssize_t. + 2008-04-24 Steve Ellcey * gcc.dg/lower-subreg-1.c: Skip IA64 platform. diff --git a/gcc/testsuite/gcc.dg/array-quals-1.c b/gcc/testsuite/gcc.dg/array-quals-1.c index 24027bc8ce3..514daf8bc55 100644 --- a/gcc/testsuite/gcc.dg/array-quals-1.c +++ b/gcc/testsuite/gcc.dg/array-quals-1.c @@ -4,7 +4,7 @@ /* Origin: Joseph Myers */ /* { dg-do compile } */ /* The MMIX port always switches to the .data section at the end of a file. */ -/* { dg-final { scan-assembler-not "\\.data(?!\\.rel\\.ro)" { xfail powerpc*-*-aix* mmix-*-* } } } */ +/* { dg-final { scan-assembler-not "\\.data(?!\\.rel\\.ro)" { xfail powerpc*-*-aix* mmix-*-* x86_64-*-mingw* } } } */ static const int a[2] = { 1, 2 }; const int a1[2] = { 1, 2 }; typedef const int ci; diff --git a/gcc/testsuite/gcc.dg/builtins-12.c b/gcc/testsuite/gcc.dg/builtins-12.c index 22ba8ce3d31..61a80edf78f 100644 --- a/gcc/testsuite/gcc.dg/builtins-12.c +++ b/gcc/testsuite/gcc.dg/builtins-12.c @@ -6,6 +6,7 @@ Written by Roger Sayle, 12th April 2003. */ /* { dg-do compile } */ +/* { dg-options "-ansi" } */ /* { dg-final { scan-assembler-not "__builtin_" } } */ typedef __SIZE_TYPE__ size_t; diff --git a/gcc/testsuite/gcc.dg/builtins-13.c b/gcc/testsuite/gcc.dg/builtins-13.c index befcd3447ad..149407b5406 100644 --- a/gcc/testsuite/gcc.dg/builtins-13.c +++ b/gcc/testsuite/gcc.dg/builtins-13.c @@ -6,6 +6,7 @@ Written by Roger Sayle, 12th April 2003. */ /* { dg-do link } */ +/* { dg-options "-ansi" } */ typedef __SIZE_TYPE__ size_t; diff --git a/gcc/testsuite/gcc.dg/c90-const-expr-2.c b/gcc/testsuite/gcc.dg/c90-const-expr-2.c index 8c2c99f5cdb..cad5bc8673b 100644 --- a/gcc/testsuite/gcc.dg/c90-const-expr-2.c +++ b/gcc/testsuite/gcc.dg/c90-const-expr-2.c @@ -14,7 +14,7 @@ int *a; int b; long *c; -#ifdef _LP64 +#if defined(_LP64) || defined(_WIN64) #define ZERO 0L #else #define ZERO 0 diff --git a/gcc/testsuite/gcc.dg/c99-const-expr-2.c b/gcc/testsuite/gcc.dg/c99-const-expr-2.c index 1a457e51a7d..555a58c0a63 100644 --- a/gcc/testsuite/gcc.dg/c99-const-expr-2.c +++ b/gcc/testsuite/gcc.dg/c99-const-expr-2.c @@ -14,7 +14,7 @@ int *a; int b; long *c; -#ifdef _LP64 +#if defined(_LP64) || defined(_WIN64) #define ZERO 0L #else #define ZERO 0 diff --git a/gcc/testsuite/gcc.dg/ia64-sync-1.c b/gcc/testsuite/gcc.dg/ia64-sync-1.c index 8f4512e4fbf..efca5d7a049 100644 --- a/gcc/testsuite/gcc.dg/ia64-sync-1.c +++ b/gcc/testsuite/gcc.dg/ia64-sync-1.c @@ -7,8 +7,10 @@ /* Test basic functionality of the intrinsics. The operations should not be optimized away if no one checks the return values. */ +__extension__ typedef __SIZE_TYPE__ size_t; + extern void abort (void); -extern void *memcpy (void *, const void *, __SIZE_TYPE__); +extern void *memcpy (void *, const void *, size_t); static int AI[12]; static int init_noret_si[12] = { 0, 0, 0, 1, 0, 0, 0, 0, -1, 0, 0, 0 }; diff --git a/gcc/testsuite/gcc.dg/ia64-sync-2.c b/gcc/testsuite/gcc.dg/ia64-sync-2.c index bb8c728bea3..b3ff127d9a3 100644 --- a/gcc/testsuite/gcc.dg/ia64-sync-2.c +++ b/gcc/testsuite/gcc.dg/ia64-sync-2.c @@ -6,8 +6,10 @@ /* Test basic functionality of the intrinsics. */ +__extension__ typedef __SIZE_TYPE__ size_t; + extern void abort (void); -extern void *memcpy (void *, const void *, __SIZE_TYPE__); +extern void *memcpy (void *, const void *, size_t); static int AI[18]; static int init_si[18] = { 0,0,0,1,0,0,0,0,-1,0,0,0,0,0,-1,0,0,0 }; diff --git a/gcc/testsuite/gcc.dg/ia64-sync-3.c b/gcc/testsuite/gcc.dg/ia64-sync-3.c index d093cdd4cb1..965d4359e86 100644 --- a/gcc/testsuite/gcc.dg/ia64-sync-3.c +++ b/gcc/testsuite/gcc.dg/ia64-sync-3.c @@ -6,8 +6,10 @@ /* Test basic functionality of the intrinsics. */ +__extension__ typedef __SIZE_TYPE__ size_t; + extern void abort (void); -extern void *memcpy (void *, const void *, __SIZE_TYPE__); +extern void *memcpy (void *, const void *, size_t); static int AI[4]; static int init_si[4] = { -30,-30,-50,-50 }; diff --git a/gcc/testsuite/gcc.dg/large-size-array-2.c b/gcc/testsuite/gcc.dg/large-size-array-2.c index 5411b838fac..8c72a442deb 100644 --- a/gcc/testsuite/gcc.dg/large-size-array-2.c +++ b/gcc/testsuite/gcc.dg/large-size-array-2.c @@ -4,4 +4,4 @@ static char * name[] = { [0x80000000] = "bar" }; -/* { dg-error "too large" "" { target { ! lp64 } } 6 } */ +/* { dg-error "too large" "" { target { ! { lp64 x86_64-*-mingw* } } } 6 } */ diff --git a/gcc/testsuite/gcc.dg/large-size-array-3.c b/gcc/testsuite/gcc.dg/large-size-array-3.c index 0b6149ba5a5..ea13b933ae5 100644 --- a/gcc/testsuite/gcc.dg/large-size-array-3.c +++ b/gcc/testsuite/gcc.dg/large-size-array-3.c @@ -1,7 +1,7 @@ /* { dg-do compile } */ #include -#ifdef __LP64__ +#if defined(__LP64__) || defined(_WIN64) #define DIM (UINT_MAX>>1)+1 #else #define DIM 65536 diff --git a/gcc/testsuite/gcc.dg/large-size-array-4.c b/gcc/testsuite/gcc.dg/large-size-array-4.c index 020d57e2c64..16692b717f4 100644 --- a/gcc/testsuite/gcc.dg/large-size-array-4.c +++ b/gcc/testsuite/gcc.dg/large-size-array-4.c @@ -4,4 +4,4 @@ static char * name[] = { [0x80000000] = "bar" }; -/* { dg-error "too large" "" { target { ! lp64 } } 6 } */ +/* { dg-error "too large" "" { target { ! { lp64 x86_64-*-mingw* } } 6 } */ diff --git a/gcc/testsuite/gcc.dg/large-size-array.c b/gcc/testsuite/gcc.dg/large-size-array.c index 855d77e5e67..6ea76066934 100644 --- a/gcc/testsuite/gcc.dg/large-size-array.c +++ b/gcc/testsuite/gcc.dg/large-size-array.c @@ -1,7 +1,7 @@ /* { dg-do compile } */ #include -#ifdef __LP64__ +#if defined(__LP64__) || defined(_WIN64) #define DIM UINT_MAX>>1 #else #define DIM USHRT_MAX>>1 diff --git a/gcc/testsuite/gcc.dg/max-1.c b/gcc/testsuite/gcc.dg/max-1.c index a5f16056c31..40f2145c038 100644 --- a/gcc/testsuite/gcc.dg/max-1.c +++ b/gcc/testsuite/gcc.dg/max-1.c @@ -7,14 +7,19 @@ /* m32c has varying sized pointers */ /* { dg-skip-if "" { "m32c-*-*" } { "*" } { "-mcpu=m32c" "-mcpu=m32cm" } } */ +/* Kludge to make it signed. */ +#define unsigned signed +__extension__ typedef __SIZE_TYPE__ ssize_t; +#undef unsigned + extern void abort (void); -long fff[10]; +ssize_t fff[10]; -void f(long a, long b) +void f(ssize_t a, ssize_t b) { - long crcc = b; - long d = *((long*)(a+1)); + ssize_t crcc = b; + ssize_t d = *((ssize_t*)(a+1)); int i; a = d >= b? d:b; @@ -27,11 +32,11 @@ void f(long a, long b) /* The variable a cannot be a local variable as we get better aliasing now and decide that the store to a is dead. The better aliasing comes from better representation of pointer arithmetic. */ -long a = 10; +ssize_t a = 10; int main(void) { int i; - f((long)(&a)-1,0); + f((ssize_t)(&a)-1,0); for(i = 0;i<10;i++) if (fff[i]!=10) abort (); diff --git a/gcc/testsuite/gcc.dg/pr25682.c b/gcc/testsuite/gcc.dg/pr25682.c index 3a1d7c2ba59..4118862a1ff 100644 --- a/gcc/testsuite/gcc.dg/pr25682.c +++ b/gcc/testsuite/gcc.dg/pr25682.c @@ -1,5 +1,6 @@ /* PR c/25682 */ /* { dg-do compile } */ +/* { dg-options "-ansi" } */ /* Test whether we don't ICE on questionable constructs where offsetof should have been used instead. */ diff --git a/gcc/testsuite/gcc.dg/pr33694.c b/gcc/testsuite/gcc.dg/pr33694.c index eb7655e8585..fa62b9eaed2 100644 --- a/gcc/testsuite/gcc.dg/pr33694.c +++ b/gcc/testsuite/gcc.dg/pr33694.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-options "-ansi" } */ /* This used to ICE with type-checking enabled. */ -- 2.30.2