large-size-array-2.c: Fix target requirement.

2009-09-08  Ozkan Sezer  <sezeroz@gmail.com>

        * gcc.dg/large-size-array-2.c: Fix target requirement.
        * gcc.dg/large-size-array-4.c: Likewise.
        * gcc.dg/c99-const-expr-2.c: Define ZERO as 0LL for _WIN64.
        * gcc.dg/c90-const-expr-2.c: Likewise.
        * gcc.dg/torture/pr39074.c: Use intptr_t typedef'ed as __PTRDIFF_TYPE__
        instead of long.
        * gcc.dg/tree-ssa/pr33920.c: Likewise.
        * gcc.dg/vect/pr33846.c: Likewise.
        * gcc.dg/vect/pr33833.c: Use uintptr_t, typedef'ed as unsigned
        __PTRDIFF_TYPE__, instead of unsigned long.
        * gcc.dg/vect/O1-pr33854.c: Use __SIZE_TYPE__ instead of unsigned long.

From-SVN: r151532
This commit is contained in:
Ozkan Sezer 2009-09-08 19:10:43 +00:00 committed by Kai Tietz
parent 207c99a14a
commit 9167949c93
10 changed files with 38 additions and 11 deletions

View File

@ -1,3 +1,17 @@
2009-09-08 Ozkan Sezer <sezeroz@gmail.com>
* gcc.dg/large-size-array-2.c: Fix target requirement.
* gcc.dg/large-size-array-4.c: Likewise.
* gcc.dg/c99-const-expr-2.c: Define ZERO as 0LL for _WIN64.
* gcc.dg/c90-const-expr-2.c: Likewise.
* gcc.dg/torture/pr39074.c: Use intptr_t typedef'ed as __PTRDIFF_TYPE__
instead of long.
* gcc.dg/tree-ssa/pr33920.c: Likewise.
* gcc.dg/vect/pr33846.c: Likewise.
* gcc.dg/vect/pr33833.c: Use uintptr_t, typedef'ed as unsigned
__PTRDIFF_TYPE__, instead of unsigned long.
* gcc.dg/vect/O1-pr33854.c: Use __SIZE_TYPE__ instead of unsigned long.
2009-09-07 Uros Bizjak <ubizjak@gmail.com>
Backport from mainline:

View File

@ -14,8 +14,10 @@ int *a;
int b;
long *c;
#if defined(_LP64) || defined(_WIN64)
#if defined(_LP64)
#define ZERO 0L
#elif defined(_WIN64)
#define ZERO 0LL
#else
#define ZERO 0
#endif

View File

@ -14,8 +14,10 @@ int *a;
int b;
long *c;
#if defined(_LP64) || defined(_WIN64)
#if defined(_LP64)
#define ZERO 0L
#elif defined(_WIN64)
#define ZERO 0LL
#else
#define ZERO 0
#endif

View File

@ -4,4 +4,4 @@
static char * name[] = {
[0x80000000] = "bar"
};
/* { dg-error "too large" "" { target { { ! lp64 } || x86_64-*-mingw* } } 6 } */
/* { dg-error "too large" "" { target { { ! lp64 } && { ! llp64 } } } 6 } */

View File

@ -4,4 +4,4 @@
static char * name[] = {
[0x80000000] = "bar"
};
/* { dg-error "too large" "" { target { { ! lp64 } || x86_64-*-mingw* } } 6 } */
/* { dg-error "too large" "" { target { { ! lp64 } && { ! llp64 } } } 6 } */

View File

@ -2,9 +2,11 @@
/* { dg-options "-fdump-tree-alias" } */
/* { dg-skip-if "" { *-*-* } { "-O0" } { "" } } */
typedef __PTRDIFF_TYPE__ intptr_t;
int i;
void __attribute__((noinline))
foo(long b, long q)
foo(long b, intptr_t q)
{
int *y;
int **a = &y, **x;

View File

@ -2,6 +2,7 @@
/* { dg-do compile } */
/* { dg-options "-O3" } */
typedef __PTRDIFF_TYPE__ intptr_t;
typedef union lispunion *object;
struct character
{
@ -22,14 +23,14 @@ void init_code ()
object V659;
object _x, _y;
object V643;
long V648;
intptr_t V648;
unsigned char V653;
object V651;
object V654;
object V658;
T1240:
if (V648 >= (long)V651) /* { dg-warning "cast from pointer to integer of different size" "" { target { ! int32plus } } } */
if (V648 >= (intptr_t)V651) /* { dg-warning "cast from pointer to integer of different size" "" { target { ! int32plus } } } */
goto T1243;
V653 = ((char *) V654->v.v_self)[V648];
V659 = (object) V654 + V653;
@ -41,7 +42,7 @@ T1261:
goto T1249;
goto T1224;
T1249:
V648 = (long) V648 + 1;
V648 = (intptr_t) V648 + 1;
goto T1240;
T1243:
V643 = (object) & Cnil_body;

View File

@ -1,7 +1,7 @@
/* Testcase by Martin Michlmayr <tbm@cyrius.com> */
/* { dg-do compile } */
extern void *malloc (long unsigned int __size);
extern void *malloc (__SIZE_TYPE__ __size);
typedef struct VMatrix_ VMatrix;
struct VMatrix_
{

View File

@ -1,6 +1,10 @@
/* Testcase by Martin Michlmayr <tbm@cyrius.com> */
/* { dg-do compile } */
#define signed
typedef unsigned __PTRDIFF_TYPE__ uintptr_t;
#undef signed
struct list_head
{
struct list_head *prev;
@ -14,7 +18,7 @@ struct rq
struct prio_array *active, arrays[2];
} per_cpu__runqueues;
void sched_init (unsigned long __ptr)
void sched_init (uintptr_t __ptr)
{
int j, k;
struct prio_array *array;

View File

@ -7,7 +7,9 @@ int clamp_val (int i)
return ~i >> 31;
}
void _mix_some_samples (long buf, int *mix_buffer, int mix_size)
typedef __PTRDIFF_TYPE__ intptr_t;
void _mix_some_samples (intptr_t buf, int *mix_buffer, int mix_size)
{
int i;
signed int *p = mix_buffer;