2 /* { dg-options "-O2 -fipa-ra" } */
4 extern void abort (void);
6 #if (__SIZEOF_LONG_LONG__ == __SIZEOF_POINTER__)
7 #define ADD_SUFFIX(a) a ## ULL
8 #elif (__SIZEOF_LONG__ == __SIZEOF_POINTER__)
9 #define ADD_SUFFIX(a) a ## UL
10 #elif (__SIZEOF_INT__ == __SIZEOF_POINTER__)
11 #define ADD_SUFFIX(a) a ## U
13 #error Add target support here
16 #if __SIZEOF_POINTER__ <= 4
17 /* Use a 16 bit pointer to have a valid pointer for 16-bit to 31-bit pointer
18 architectures. Using sizeof, we cannot distinguish between 31-bit and 32-bit
19 pointer types, so we also handle the 32-bit pointer type case here. */
20 #define CONST_PTR ADD_SUFFIX (0x800)
22 /* For x86_64 -m64, the problem reproduces with this 32-bit CONST_PTR, but not
23 with a 2-power below it. */
24 #define CONST_PTR ADD_SUFFIX (0x80000000)
27 int __attribute__((noinline
, noclone
))
35 unsigned long p
, q
, r
;
42 void __attribute__((noinline
, noclone
))
48 __attribute__((noinline
, noclone
)) void *
51 /* Just a statement to make it a non-const function. */
57 int __attribute__((noinline
, noclone
))
60 struct S
*x
= (struct S
*) CONST_PTR
;
75 if (s2
!= (((struct S
*) CONST_PTR
) + 1))