summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/s390/asm-machine-3.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.target/s390/asm-machine-3.c')
-rw-r--r--gcc/testsuite/gcc.target/s390/asm-machine-3.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/s390/asm-machine-3.c b/gcc/testsuite/gcc.target/s390/asm-machine-3.c
new file mode 100644
index 00000000000..b056b1933d1
--- /dev/null
+++ b/gcc/testsuite/gcc.target/s390/asm-machine-3.c
@@ -0,0 +1,19 @@
+/* Functional tests for the "target" attribute and pragma. */
+
+/* { dg-require-effective-target target_attribute } */
+/* { dg-options "-march=z13 -mzarch" } */
+
+void foo(void) { }
+
+#pragma GCC target("arch=z10")
+void bar(void) { }
+
+/* { dg-final { scan-assembler-times "\t\.machine push" 1 } } */
+/* { dg-final { scan-assembler-times "\t\.machine pop" 1 } } */
+/* { dg-final { scan-assembler-times "\t\.machine \"z10\"" 1 } } */
+/* { dg-final { scan-assembler-times "\t\.machinemode push" 1 } } */
+/* { dg-final { scan-assembler-times "\t\.machinemode zarch" 1 } } */
+/* { dg-final { scan-assembler-times "\t\.machinemode pop" 1 } } */
+
+/* { dg-final { scan-assembler-times "\t\.machine " 3 } } */
+/* { dg-final { scan-assembler-times "\t\.machinemode " 3 } } */