20020919-1.c (loc_size_t): New type.

2008-04-23  Kai Tietz  <kai.tietz@onevision.com>

	* 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
This commit is contained in:
Kai Tietz 2008-04-23 07:53:55 +00:00 committed by Kai Tietz
parent d7066497b0
commit 4991bfc813
3 changed files with 15 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2008-04-23 Kai Tietz <kai.tietz@onevision.com>
* 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 <tkoenig@gcc.gnu.org>
PR libfortran/35988

View File

@ -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

View File

@ -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)