1 /* { dg-do run { target x32 } } */ 2 /* { dg-require-effective-target maybe_x32 } */ 3 /* { dg-options "-O2 -mx32 -maddress-mode=long" } */ 4 5 extern void abort (void); 6 7 long long li; 8 9 long long 10 __attribute__ ((noinline)) testfunc(void * addr)11testfunc (void* addr) 12 { 13 li = (long long)(int)addr; 14 li &= 0xffffffff; 15 return li; 16 } 17 main(void)18int main (void) 19 { 20 volatile long long rv_test; 21 rv_test = testfunc((void*)0x87651234); 22 if (rv_test != 0x87651234ULL) 23 abort (); 24 25 return 0; 26 } 27