From 69bb863a1f5a3ffad2f9504708ee1e37be2e50d3 Mon Sep 17 00:00:00 2001 From: Kai Tietz Date: Fri, 8 Mar 2013 09:46:49 +0100 Subject: [PATCH] pr14092-1.c: Mark intptr_t typedef to use extension. * gcc.dg/pr14092-1.c: Mark intptr_t typedef to use extension. * gcc.dg/pr24683.c: Avoid warning about casting constant string. * gcc.dg/pr52549.c: Add LLP64 case. * gcc.dg/pr53701.c: Use for uintptr_t typedef __UINTPTR_TYPE__. * gcc.dg/pr56510.c: Adjust for LLP64 targets. * gcc.dg/torture/pr51071-2.c: Likewise. * gcc.dg/tree-ssa/vrp72.c: Likewise. * gcc.dg/tree-ssa/vrp73.c: Likewise. * gcc.dg/tree-ssa/vrp75.c: Likewise. * gcc.dg/torture/pr53922.c: Skike for mingw-targets. * gcc.dg/weak/weak-1.c: Likewise. * gcc.dg/weak/weak-2.c: Likewise. * gcc.dg/weak/weak-3.c: Likewise. * gcc.dg/weak/weak-4.c: Likewise. * gcc.dg/weak/weak-5.c: Likewise. * gcc.dg/weak/weak-15.c: Likewise. * gcc.dg/weak/weak-16.c: Likewise. From-SVN: r196540 --- gcc/testsuite/ChangeLog | 18 ++++++++++++++++++ gcc/testsuite/gcc.dg/pr14092-1.c | 2 +- gcc/testsuite/gcc.dg/pr24683.c | 6 +++--- gcc/testsuite/gcc.dg/pr52549.c | 5 +++++ gcc/testsuite/gcc.dg/pr53701.c | 2 +- gcc/testsuite/gcc.dg/pr56510.c | 3 ++- gcc/testsuite/gcc.dg/torture/pr51071-2.c | 6 ++++-- gcc/testsuite/gcc.dg/torture/pr53922.c | 1 + gcc/testsuite/gcc.dg/tree-ssa/vrp72.c | 5 +++-- gcc/testsuite/gcc.dg/tree-ssa/vrp73.c | 6 ++++-- gcc/testsuite/gcc.dg/tree-ssa/vrp75.c | 5 +++-- gcc/testsuite/gcc.dg/weak/weak-1.c | 1 + gcc/testsuite/gcc.dg/weak/weak-15.c | 1 + gcc/testsuite/gcc.dg/weak/weak-16.c | 1 + gcc/testsuite/gcc.dg/weak/weak-2.c | 1 + gcc/testsuite/gcc.dg/weak/weak-3.c | 1 + gcc/testsuite/gcc.dg/weak/weak-4.c | 1 + gcc/testsuite/gcc.dg/weak/weak-5.c | 1 + 18 files changed, 52 insertions(+), 14 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 5230aa2816c..84c6194efea 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,23 @@ 2013-03-08 Kai Tietz + * gcc.dg/pr14092-1.c: Mark intptr_t typedef to use extension. + * gcc.dg/pr24683.c: Avoid warning about casting constant string. + * gcc.dg/pr52549.c: Add LLP64 case. + * gcc.dg/pr53701.c: Use for uintptr_t typedef __UINTPTR_TYPE__. + * gcc.dg/pr56510.c: Adjust for LLP64 targets. + * gcc.dg/torture/pr51071-2.c: Likewise. + * gcc.dg/tree-ssa/vrp72.c: Likewise. + * gcc.dg/tree-ssa/vrp73.c: Likewise. + * gcc.dg/tree-ssa/vrp75.c: Likewise. + * gcc.dg/torture/pr53922.c: Skike for mingw-targets. + * gcc.dg/weak/weak-1.c: Likewise. + * gcc.dg/weak/weak-2.c: Likewise. + * gcc.dg/weak/weak-3.c: Likewise. + * gcc.dg/weak/weak-4.c: Likewise. + * gcc.dg/weak/weak-5.c: Likewise. + * gcc.dg/weak/weak-15.c: Likewise. + * gcc.dg/weak/weak-16.c: Likewise. + * c-c++-common/pr54486.c: Skip test for mingw-targets. 2013-03-07 Jakub Jelinek diff --git a/gcc/testsuite/gcc.dg/pr14092-1.c b/gcc/testsuite/gcc.dg/pr14092-1.c index 1c103ccb312..61fc8f7016d 100644 --- a/gcc/testsuite/gcc.dg/pr14092-1.c +++ b/gcc/testsuite/gcc.dg/pr14092-1.c @@ -6,7 +6,7 @@ /* Define this so that we are more portable. The testcase in the PR failed on 64-bit hosts. */ -typedef __INTPTR_TYPE__ intptr_t; +__extension__ typedef __INTPTR_TYPE__ intptr_t; typedef struct _PLCI { unsigned char x; diff --git a/gcc/testsuite/gcc.dg/pr24683.c b/gcc/testsuite/gcc.dg/pr24683.c index 79d3210067c..23cb3ab4b01 100644 --- a/gcc/testsuite/gcc.dg/pr24683.c +++ b/gcc/testsuite/gcc.dg/pr24683.c @@ -1,11 +1,11 @@ /* { dg-do compile { target fpic } } */ /* { dg-options "-O2 -fPIC" } */ -int *block; +const int *block; void final(unsigned int j) { unsigned int i; - unsigned char *data = (unsigned char *)"\0"; + const unsigned char *data = (const unsigned char *)"\0"; for (i = 0; i < 8; i++) for (; j + 63 < 1; j += 64) - block = (int *) &data[j]; + block = (const int *) &data[j]; } diff --git a/gcc/testsuite/gcc.dg/pr52549.c b/gcc/testsuite/gcc.dg/pr52549.c index 382f77d0594..90936529d8d 100644 --- a/gcc/testsuite/gcc.dg/pr52549.c +++ b/gcc/testsuite/gcc.dg/pr52549.c @@ -10,4 +10,9 @@ _mark (int obj, int i, char *a) { (char *)&(((int *)(obj)) [i]) - a; } +#elif __SIZEOF_POINTER__ == __SIZEOF_LONG_LONG__ +__extension__ _mark (long long obj, int i, char *a) +{ + (char *)&(((int *)(obj)) [i]) - a; +} #endif diff --git a/gcc/testsuite/gcc.dg/pr53701.c b/gcc/testsuite/gcc.dg/pr53701.c index 2c852238110..15bf07d61e7 100644 --- a/gcc/testsuite/gcc.dg/pr53701.c +++ b/gcc/testsuite/gcc.dg/pr53701.c @@ -1,7 +1,7 @@ /* { dg-do compile { target powerpc*-*-* ia64-*-* i?86-*-* x86_64-*-* } } */ /* { dg-options "-O3 -fselective-scheduling2 -fsel-sched-pipelining" } */ typedef unsigned short int uint16_t; -typedef unsigned long int uintptr_t; +__extension__ typedef __UINTPTR_TYPE__ uintptr_t; typedef struct GFX_VTABLE { int color_depth; diff --git a/gcc/testsuite/gcc.dg/pr56510.c b/gcc/testsuite/gcc.dg/pr56510.c index 1f8e21a57bf..d018d7d4baa 100644 --- a/gcc/testsuite/gcc.dg/pr56510.c +++ b/gcc/testsuite/gcc.dg/pr56510.c @@ -2,11 +2,12 @@ /* { dg-do compile } */ /* { dg-options "-O2 -g" } */ +__extension__ typedef __INTPTR_TYPE__ intptr_t; struct S { unsigned long s1; void **s2[0]; }; void **a, **b, **c, **d, **e, **f; static void ** -baz (long x, long y) +baz (intptr_t x, intptr_t y) { void **s = f; *f = (void **) (y << 8 | (x & 0xff)); diff --git a/gcc/testsuite/gcc.dg/torture/pr51071-2.c b/gcc/testsuite/gcc.dg/torture/pr51071-2.c index f66a89f3958..b67879c443d 100644 --- a/gcc/testsuite/gcc.dg/torture/pr51071-2.c +++ b/gcc/testsuite/gcc.dg/torture/pr51071-2.c @@ -1,9 +1,11 @@ /* { dg-do compile } */ /* { dg-options "-fno-delete-null-pointer-checks" } */ +__extension__ typedef __UINTPTR_TYPE__ uintptr_t; + extern struct module __this_module; static inline void -trace_module_get (struct module *mod, unsigned long ip) { } +trace_module_get (struct module *mod, uintptr_t ip) { } struct module; static inline __attribute__((no_instrument_function)) int try_module_get(struct module *module) @@ -16,7 +18,7 @@ int try_module_get(struct module *module) __label__ __here; asm(""); __here: - trace_module_get(module, (unsigned long)&&__here); + trace_module_get(module, (uintptr_t)&&__here); } else ret = 0; diff --git a/gcc/testsuite/gcc.dg/torture/pr53922.c b/gcc/testsuite/gcc.dg/torture/pr53922.c index 5a0e9d1daff..e4136014326 100644 --- a/gcc/testsuite/gcc.dg/torture/pr53922.c +++ b/gcc/testsuite/gcc.dg/torture/pr53922.c @@ -1,5 +1,6 @@ /* { dg-do run } */ /* { dg-require-weak "" } */ +/* { dg-skip-if "No undefined" { *-*-mingw* } { "*" } { "" } } */ /* { dg-skip-if "No undefined weak" { hppa*-*-hpux* && { ! lp64 } } { "*" } { "" } } */ /* { dg-options "-Wl,-undefined,dynamic_lookup" { target *-*-darwin* } } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vrp72.c b/gcc/testsuite/gcc.dg/tree-ssa/vrp72.c index 67c7602e378..0b12aad0e2b 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/vrp72.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/vrp72.c @@ -1,14 +1,15 @@ /* { dg-options "-O2" } */ +typedef __INTPTR_TYPE__ intptr_t; typedef unsigned long long uint64_t; static inline void cvmx_write64_uint64(uint64_t addr, uint64_t val) { - *(volatile uint64_t *)(long)addr = val; + *(volatile uint64_t *)(intptr_t)addr = val; }; static inline uint64_t cvmx_read64_uint64(uint64_t addr) { - return *(volatile uint64_t *)(long)addr; + return *(volatile uint64_t *)(intptr_t)addr; }; static inline void cvmx_write_csr(uint64_t csr_addr, uint64_t val) diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vrp73.c b/gcc/testsuite/gcc.dg/tree-ssa/vrp73.c index 48e7805fa07..ea557fd9b69 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/vrp73.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/vrp73.c @@ -1,14 +1,16 @@ /* { dg-options "-O2" } */ +__extension__ typedef __INTPTR_TYPE__ intptr_t; + typedef unsigned long long uint64_t; static inline void cvmx_write64_uint64(uint64_t addr, uint64_t val) { - *(volatile uint64_t *)(long)addr = val; + *(volatile uint64_t *)(intptr_t)addr = val; }; static inline uint64_t cvmx_read64_uint64(uint64_t addr) { - return *(volatile uint64_t *)(long)addr; + return *(volatile uint64_t *)(intptr_t)addr; }; static inline void cvmx_write_csr(uint64_t csr_addr, uint64_t val) diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vrp75.c b/gcc/testsuite/gcc.dg/tree-ssa/vrp75.c index 91fd3f71bd5..42b33870777 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/vrp75.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/vrp75.c @@ -1,14 +1,15 @@ /* { dg-options "-O2" } */ +__extension__ typedef __INTPTR_TYPE__ intptr_t; typedef unsigned long long uint64_t; static inline void cvmx_write64_uint64(uint64_t addr, uint64_t val) { - *(volatile uint64_t *)(long)addr = val; + *(volatile uint64_t *)(intptr_t)addr = val; }; static inline uint64_t cvmx_read64_uint64(uint64_t addr) { - return *(volatile uint64_t *)(long)addr; + return *(volatile uint64_t *)(intptr_t)addr; }; static inline void cvmx_write_csr(uint64_t csr_addr, uint64_t val) { diff --git a/gcc/testsuite/gcc.dg/weak/weak-1.c b/gcc/testsuite/gcc.dg/weak/weak-1.c index 078c3ef3615..14e9de7acba 100644 --- a/gcc/testsuite/gcc.dg/weak/weak-1.c +++ b/gcc/testsuite/gcc.dg/weak/weak-1.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-require-weak "" } */ /* { dg-options "-fno-common" } */ +/* { dg-skip-if "" { *-*-mingw* } { "*" } { "" } } */ /* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?a" } } */ /* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?b" } } */ diff --git a/gcc/testsuite/gcc.dg/weak/weak-15.c b/gcc/testsuite/gcc.dg/weak/weak-15.c index 2218ca4a746..34b089bda5b 100644 --- a/gcc/testsuite/gcc.dg/weak/weak-15.c +++ b/gcc/testsuite/gcc.dg/weak/weak-15.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-require-weak "" } */ /* { dg-options "-fno-common" } */ +/* { dg-skip-if "" { x86_64-*-mingw* } { "*" } { "" } } */ /* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?a" } } */ /* { dg-final { scan-assembler-not "weak\[^ \t\]*\[ \t\]_?b" } } */ diff --git a/gcc/testsuite/gcc.dg/weak/weak-16.c b/gcc/testsuite/gcc.dg/weak/weak-16.c index 3bcf3885d7d..d557a6e45fb 100644 --- a/gcc/testsuite/gcc.dg/weak/weak-16.c +++ b/gcc/testsuite/gcc.dg/weak/weak-16.c @@ -4,6 +4,7 @@ /* { dg-options "-fno-common -Os" } */ /* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?kallsyms_token_index" } } */ /* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?kallsyms_token_table" } } */ +/* { dg-skip-if "" { x86_64-*-mingw* } { "*" } { "" } } */ extern int kallsyms_token_index[] __attribute__((weak)); extern int kallsyms_token_table[] __attribute__((weak)); diff --git a/gcc/testsuite/gcc.dg/weak/weak-2.c b/gcc/testsuite/gcc.dg/weak/weak-2.c index 973f4c216b6..b328c3c088b 100644 --- a/gcc/testsuite/gcc.dg/weak/weak-2.c +++ b/gcc/testsuite/gcc.dg/weak/weak-2.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-require-weak "" } */ /* { dg-options "-fno-common" } */ +/* { dg-skip-if "" { x86_64-*-mingw* } { "*" } { "" } } */ /* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?ffoo1a" } } */ /* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?ffoo1b" } } */ diff --git a/gcc/testsuite/gcc.dg/weak/weak-3.c b/gcc/testsuite/gcc.dg/weak/weak-3.c index 748bd236cc5..ca6e0b62087 100644 --- a/gcc/testsuite/gcc.dg/weak/weak-3.c +++ b/gcc/testsuite/gcc.dg/weak/weak-3.c @@ -2,6 +2,7 @@ /* { dg-require-alias "" } */ /* { dg-require-weak "" } */ /* { dg-options "-fno-common -Waddress" } */ +/* { dg-skip-if "" { x86_64-*-mingw* } { "*" } { "" } } */ /* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?ffoo1a" } } */ /* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?ffoo1b" } } */ diff --git a/gcc/testsuite/gcc.dg/weak/weak-4.c b/gcc/testsuite/gcc.dg/weak/weak-4.c index cd8a1e9124d..a84f5808312 100644 --- a/gcc/testsuite/gcc.dg/weak/weak-4.c +++ b/gcc/testsuite/gcc.dg/weak/weak-4.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-require-weak "" } */ /* { dg-options "-fno-common" } */ +/* { dg-skip-if "" { x86_64-*-mingw* } { "*" } { "" } } */ /* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?vfoo1a" } } */ /* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?vfoo1b" } } */ diff --git a/gcc/testsuite/gcc.dg/weak/weak-5.c b/gcc/testsuite/gcc.dg/weak/weak-5.c index e82792af3ff..714c9dca0a4 100644 --- a/gcc/testsuite/gcc.dg/weak/weak-5.c +++ b/gcc/testsuite/gcc.dg/weak/weak-5.c @@ -2,6 +2,7 @@ /* { dg-require-weak "" } */ /* { dg-require-alias "" } */ /* { dg-options "-fno-common" } */ +/* { dg-skip-if "" { x86_64-*-mingw* } { "*" } { "" } } */ /* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?vfoo1a" } } */ /* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?vfoo1b" } } */