1/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */ 2/* { dg-final { scan-assembler "mov.w r.,32532" } } */ 3 4#define SFRA (*((volatile unsigned short*)0x7f14)) 5unsigned short *pA = (unsigned short *) 0x7f14; 6#define SFRB (*((volatile unsigned short*)0x7f10)) 7unsigned short *pB = (unsigned short *) 0x7f10; 8 9char * 10Do (void) 11{ 12 if (SFRA & 0x0800) 13 { 14 if (SFRB & 0x0800) 15 return "Fail"; 16 else 17 return "Success"; 18 } 19 else 20 return "Fail"; 21} 22 23int 24main (void) 25{ 26 *pA = 0xedcb; 27 *pB = 0x1234; 28 return Do ()[0] == 'F'; 29} 30