This commit was manufactured by cvs2svn to create branch
[official-gcc.git] / gcc / testsuite / gcc.dg / ultrasp4.c
blob1c72d0659d4fa0b3c31a2902235266ba73ba3b0a
1 /* Simplified from PR target/5309. */
2 /* { dg-do compile } */
3 /* { dg-options "-O2" } */
4 /* { dg-options "-O2 -mcpu=ultrasparc" { target sparc64-*-* sparcv9-*-* } } */
6 #if __INT_MAX__ > 32767
7 #define PTR_TYPE long
8 #else
9 /* For 16-bit ports a long is a 32-bit quantity. So you cannot
10 cast a 32-bit long integer into a pointer which will only be
11 16-bits long. */
12 #define PTR_TYPE int
13 #endif
15 extern PTR_TYPE bar (unsigned int);
17 PTR_TYPE
18 foo (PTR_TYPE x, unsigned int y)
20 return *(((PTR_TYPE *) (bar (y) - 1)) + 1 + (x >> 2) % 359);