aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/xstormy16/sfr/14_set_sfrw_bit_3.c
blob: b5741fc485fd80db91947cc44f973f543eae7d33 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
/* { dg-final { scan-assembler "mov.w r.,32532" } } */

#define SFR (*((volatile unsigned short*)0x7f14))
unsigned short *p = (unsigned short *) 0x7f14;

void
Do (void)
{
  SFR |= 0x0008;
}

int
main (void)
{
  *p = 0x1234;
  Do ();
  return (*p == 0x123c) ? 0 : 1;
}