From 4991bfc81333ef13140ffad4e0ea9d37d2c6ddb8 Mon Sep 17 00:00:00 2001 From: Kai Tietz Date: Wed, 23 Apr 2008 07:53:55 +0000 Subject: [PATCH] 20020919-1.c (loc_size_t): New type. 2008-04-23 Kai Tietz * gcc.dg/20020919-1.c (loc_size_t): New type. (_dl_stat): Use loc_size_t to cast pointers. * gcc.c-torture/compile/20010327-1.c: Skip for x86_64-*-mingw*. From-SVN: r134583 --- gcc/testsuite/ChangeLog | 6 ++++++ gcc/testsuite/gcc.c-torture/compile/20010327-1.c | 1 + gcc/testsuite/gcc.dg/20020919-1.c | 10 ++++++++-- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 7896b742e9e..9493fef2e55 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2008-04-23 Kai Tietz + + * gcc.dg/20020919-1.c (loc_size_t): New type. + (_dl_stat): Use loc_size_t to cast pointers. + * gcc.c-torture/compile/20010327-1.c: Skip for x86_64-*-mingw*. + 2008-04-23 Thomas Koenig PR libfortran/35988 diff --git a/gcc/testsuite/gcc.c-torture/compile/20010327-1.c b/gcc/testsuite/gcc.c-torture/compile/20010327-1.c index 59639e6ed96..f20e3a3e2dc 100644 --- a/gcc/testsuite/gcc.c-torture/compile/20010327-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/20010327-1.c @@ -1,5 +1,6 @@ /* { dg-skip-if "non-SI pointers" { m32c-*-* } { "*" } { "" } } */ /* { dg-skip-if "HI mode pointer for avr" { "avr-*-*" } { "*" } { "" } } */ +/* { dg-skip-if "non-SI pointers for w64" { "x86_64-*-mingw*" } { "*" } { "" } } */ /* This testcase tests whether GCC can produce static initialized data that references addresses of size 'unsigned long', even if that's not diff --git a/gcc/testsuite/gcc.dg/20020919-1.c b/gcc/testsuite/gcc.dg/20020919-1.c index de58b0c91f5..15519bef7b4 100644 --- a/gcc/testsuite/gcc.dg/20020919-1.c +++ b/gcc/testsuite/gcc.dg/20020919-1.c @@ -237,12 +237,18 @@ bazllb (long long llp) /* Real-world example of bug. */ +#ifdef _WIN64 +typedef unsigned int loc_size_t __attribute__ ((mode (DI))); +#else +typedef __SIZE_TYPE__ loc_size_t; +#endif + struct stat; int _dl_stat (const char *file_name, struct stat *buf) { - register long a asm (REG1) = (long) file_name; - register long b asm (REG2) = (long) buf; + register long a asm (REG1) = (long) (loc_size_t) file_name; + register long b asm (REG2) = (long) (loc_size_t) buf; asm volatile ("movu.w %1,$r9\n\tbreak 13" : "=r" (a) : "g" (106), "0" (a), "r" (b) : REG1, REG5); /* { dg-error "conflict" } */ if (a >= 0)