summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/nios2/nios2-rdctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.target/nios2/nios2-rdctl.c')
-rw-r--r--gcc/testsuite/gcc.target/nios2/nios2-rdctl.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/nios2/nios2-rdctl.c b/gcc/testsuite/gcc.target/nios2/nios2-rdctl.c
new file mode 100644
index 00000000000..6b44d88e65a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nios2/nios2-rdctl.c
@@ -0,0 +1,8 @@
+/* { dg-do compile } */
+/* { dg-final { scan-assembler "rdctl" } } */
+
+int x ()
+{
+ __builtin_rdctl (0);
+ return 0;
+}