diff options
Diffstat (limited to 'gcc/testsuite/gcc.target/xstormy16/data_below100/05_b100b_to_var.c')
-rw-r--r-- | gcc/testsuite/gcc.target/xstormy16/data_below100/05_b100b_to_var.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/xstormy16/data_below100/05_b100b_to_var.c b/gcc/testsuite/gcc.target/xstormy16/data_below100/05_b100b_to_var.c new file mode 100644 index 000000000..b2a0bd04c --- /dev/null +++ b/gcc/testsuite/gcc.target/xstormy16/data_below100/05_b100b_to_var.c @@ -0,0 +1,21 @@ +/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */ +/* { dg-final { scan-assembler "mov.b r., *B100" } } */ + +char acDummy[0xf0] __attribute__ ((__BELOW100__)); +unsigned char B100 __attribute__ ((__BELOW100__)) = 0x34; +unsigned char *p = &B100; + +unsigned char yData = 0x12; + +void +Do (void) +{ + yData = B100; +} + +int +main (void) +{ + Do (); + return (yData == 0x34) ? 0 : 1; +} |