1 /* { dg-do compile } */ 2 /* { dg-options "-O2 -mcpu=5208 -w" } */ 3 4 void __attribute__ ((noinline)) oof()5oof() 6 { 7 asm volatile ("" ::: "memory"); 8 } print_info(unsigned int * ip_addr)9int print_info(unsigned int *ip_addr) 10 { 11 int invalid = 0; 12 13 if (ip_addr) { 14 unsigned int haddr = *ip_addr; 15 oof("stuff"); 16 if (0x0 == haddr) { 17 invalid = 1; 18 } 19 oof("stuff2"); 20 } else { 21 invalid = 1; 22 } 23 24 return invalid; 25 } 26 main(int argc,char * argv[])27int main(int argc, char *argv[]) 28 { 29 unsigned int myaddr; 30 int ret; 31 32 myaddr = 0x0; 33 ret = print_info(&myaddr); 34 if (!ret) 35 abort (); 36 37 myaddr = 0x01020304; 38 ret = print_info(&myaddr); 39 if (ret) 40 abort (); 41 exit (0); 42 } 43 44 45