diff options
Diffstat (limited to 'gcc/testsuite/gcc.target/xstormy16/bss_below100/12_if1_b100b_bit_3.c')
-rw-r--r-- | gcc/testsuite/gcc.target/xstormy16/bss_below100/12_if1_b100b_bit_3.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/xstormy16/bss_below100/12_if1_b100b_bit_3.c b/gcc/testsuite/gcc.target/xstormy16/bss_below100/12_if1_b100b_bit_3.c new file mode 100644 index 000000000..865ec549b --- /dev/null +++ b/gcc/testsuite/gcc.target/xstormy16/bss_below100/12_if1_b100b_bit_3.c @@ -0,0 +1,31 @@ +/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */ +/* { dg-final { scan-assembler "b\[np\] B100A,#3," } } */ +/* { dg-final { scan-assembler "b\[np\] B100B,#3," } } */ + +char acDummy[0xf0] __attribute__ ((__BELOW100__)); +unsigned char B100A __attribute__ ((__BELOW100__)); +unsigned char *pA = &B100A; +unsigned char B100B __attribute__ ((__BELOW100__)); +unsigned char *pB = &B100B; + +char * +Do (void) +{ + if (B100A & 0x08) + { + if (B100B & 0x08) + return "Fail"; + else + return "Success"; + } + else + return "Fail"; +} + +int +main (void) +{ + *pA = 0xcb; + *pB = 0x34; + return Do ()[0] == 'F'; +} |