1 /* Functional tests for the "target" attribute and pragma.  */
2 
3 /* { dg-require-effective-target target_attribute } */
4 /* { dg-options "-march=z13 -mzarch" } */
5 
6 /* { dg-final { scan-assembler-times "\t\.machine \"z13\"" 1 } } */
7 /* { dg-final { scan-assembler-times "\t\.machinemode zarch" 2 } } */
8 
foo(void)9 void foo(void) { }
10 
11 #pragma GCC target("arch=z196")
12 __attribute__ ((target("arch=z10")))
bar(void)13 void bar(void) { }
14 
15 /* { dg-final { scan-assembler-times "\t\.machine push" 1 } } */
16 /* { dg-final { scan-assembler-times "\t\.machine pop" 1 } } */
17 /* { dg-final { scan-assembler-times "\t\.machine \"z10\"" 1 } } */
18 /* { dg-final { scan-assembler-times "\t\.machinemode push" 1 } } */
19 /* { dg-final { scan-assembler-times "\t\.machinemode zarch" 2 } } */
20 /* { dg-final { scan-assembler-times "\t\.machinemode pop" 1 } } */
21 
22 /* { dg-final { scan-assembler-times "\t\.machine " 4 } } */
23 /* { dg-final { scan-assembler-times "\t\.machinemode " 4 } } */
24