diff options
Diffstat (limited to 'gcc/testsuite/gcc.target/nios2/nios2-rdwrctl-1.c')
-rw-r--r-- | gcc/testsuite/gcc.target/nios2/nios2-rdwrctl-1.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/nios2/nios2-rdwrctl-1.c b/gcc/testsuite/gcc.target/nios2/nios2-rdwrctl-1.c new file mode 100644 index 00000000000..922942ab980 --- /dev/null +++ b/gcc/testsuite/gcc.target/nios2/nios2-rdwrctl-1.c @@ -0,0 +1,14 @@ +/* { dg-do compile } */ + +volatile int res; + +void x () +{ + __builtin_wrctl (0, res); + __builtin_wrctl (15, res); + __builtin_wrctl (31, res); + + res = __builtin_rdctl (0); + res = __builtin_rdctl (15); + res = __builtin_rdctl (31); +} |