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/c90-const-expr-2.c: Define ZERO as 0LL for _WIN64. * gcc.dg/c99-const-expr-2.c: Likewise. * gcc.dg/c90-const-expr-6.c: Typedef ptrdiff_t with __extension__. * gcc.dg/c90-const-expr-9.c: Typedef size_t with __extension__. * gcc.dg/c90-const-expr-10.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: r151533
This commit is contained in:
parent
35ecd40884
commit
60adb6417c
@ -1,3 +1,20 @@
|
||||
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/c90-const-expr-2.c: Define ZERO as 0LL for _WIN64.
|
||||
* gcc.dg/c99-const-expr-2.c: Likewise.
|
||||
* gcc.dg/c90-const-expr-6.c: Typedef ptrdiff_t with __extension__.
|
||||
* gcc.dg/c90-const-expr-9.c: Typedef size_t with __extension__.
|
||||
* gcc.dg/c90-const-expr-10.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-08 Alexandre Oliva <aoliva@redhat.com>
|
||||
|
||||
PR debug/41229
|
||||
|
@ -5,24 +5,26 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-std=iso9899:1990 -pedantic-errors" } */
|
||||
|
||||
void *p = (__SIZE_TYPE__)(void *)0; /* { dg-error "without a cast" } */
|
||||
struct s { void *a; } q = { (__SIZE_TYPE__)(void *)0 }; /* { dg-error "without a cast" } */
|
||||
__extension__ typedef __SIZE_TYPE__ size_t;
|
||||
|
||||
void *p = (size_t)(void *)0; /* { dg-error "without a cast" } */
|
||||
struct s { void *a; } q = { (size_t)(void *)0 }; /* { dg-error "without a cast" } */
|
||||
void *
|
||||
f (void)
|
||||
{
|
||||
void *r;
|
||||
r = (__SIZE_TYPE__)(void *)0; /* { dg-error "without a cast" } */
|
||||
return (__SIZE_TYPE__)(void *)0; /* { dg-error "without a cast" } */
|
||||
r = (size_t)(void *)0; /* { dg-error "without a cast" } */
|
||||
return (size_t)(void *)0; /* { dg-error "without a cast" } */
|
||||
}
|
||||
void g (void *); /* { dg-message "but argument is of type" } */
|
||||
void
|
||||
h (void)
|
||||
{
|
||||
g ((__SIZE_TYPE__)(void *)0); /* { dg-error "without a cast" } */
|
||||
g ((size_t)(void *)0); /* { dg-error "without a cast" } */
|
||||
}
|
||||
void g2 (int, void *); /* { dg-message "but argument is of type" } */
|
||||
void
|
||||
h2 (void)
|
||||
{
|
||||
g2 (0, (__SIZE_TYPE__)(void *)0); /* { dg-error "without a cast" } */
|
||||
g2 (0, (size_t)(void *)0); /* { dg-error "without a cast" } */
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -4,11 +4,13 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-std=iso9899:1990 -pedantic-errors" } */
|
||||
|
||||
__extension__ typedef __PTRDIFF_TYPE__ ptrdiff_t;
|
||||
|
||||
/* PR 29116. */
|
||||
int n = 0, p[n * 0 + 1]; /* { dg-error "variabl|can't be evaluated" } */
|
||||
|
||||
/* PR 31871. */
|
||||
extern int c[1 + ((__PTRDIFF_TYPE__) (void *) 0)]; /* { dg-error "variab|can't be evaluated" } */
|
||||
extern int c[1 + ((ptrdiff_t) (void *) 0)]; /* { dg-error "variab|can't be evaluated" } */
|
||||
|
||||
/* Implicit conversions from floating-point constants are not OK,
|
||||
although explicit ones are. */
|
||||
@ -32,7 +34,7 @@ struct s {
|
||||
};
|
||||
|
||||
enum e {
|
||||
E = (1 + ((__PTRDIFF_TYPE__) (void *) 0)), /* { dg-error "constant" } */
|
||||
E = (1 + ((ptrdiff_t) (void *) 0)), /* { dg-error "constant" } */
|
||||
E2 = 0
|
||||
};
|
||||
|
||||
@ -44,7 +46,7 @@ enum f {
|
||||
void
|
||||
f (int a)
|
||||
{
|
||||
int v[1 + ((__PTRDIFF_TYPE__) (void *) 0)]; /* { dg-error "variab|can't be evaluated" } */
|
||||
int v[1 + ((ptrdiff_t) (void *) 0)]; /* { dg-error "variab|can't be evaluated" } */
|
||||
switch (a)
|
||||
{
|
||||
case (n * 0 + 1): /* { dg-error "constant" } */
|
||||
|
@ -14,7 +14,9 @@ struct t {
|
||||
int b[2];
|
||||
};
|
||||
|
||||
#define old_offsetof(TYPE, MEMBER) ((__SIZE_TYPE__) &((TYPE *)0)->MEMBER)
|
||||
__extension__ typedef __SIZE_TYPE__ size_t;
|
||||
|
||||
#define old_offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
|
||||
|
||||
enum e {
|
||||
E1 = old_offsetof (struct s, a), /* { dg-error "constant" } */
|
||||
|
@ -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
|
||||
|
@ -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 } */
|
||||
|
@ -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 } */
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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_
|
||||
{
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user