OSDN Git Service

Latest updates from FSF 4.7 branch
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.target / xstormy16 / sfr / 13_if0_sfrb_bit_0.c
1 /* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
2
3 #define SFRA (*((volatile unsigned char*)0x7f14))
4 unsigned char *pA = (unsigned char *) 0x7f14;
5 #define SFRB (*((volatile unsigned char*)0x7f10))
6 unsigned char *pB = (unsigned char *) 0x7f10;
7
8 char *
9 Do (void)
10 {
11   if (!(SFRA & 0x01))
12     {
13       if (!(SFRB & 0x01))
14         return "Fail";
15       else
16         return "Success";
17     }
18   else
19     return "Fail";
20 }
21
22 int
23 main (void)
24 {
25   *pA = 0x34;
26   *pB = 0xcb;
27   return Do ()[0] == 'F';
28 }
29
30 /* { dg-final { scan-file "13_if0_sfrb_bit_0.s" "b\[np\] " } } */
31