[AArch64][12/14] Target attributes and target pragmas tests
[official-gcc.git] / gcc / testsuite / gcc.target / aarch64 / target_attr_7.c
blob32a840378ab4cad8cc90b896be112c7c46bc01a8
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -mcpu=thunderx -save-temps" } */
4 /* Make sure that #pragma overrides command line option and
5 target attribute overrides the pragma. */
7 #pragma GCC target ("cpu=xgene1")
9 int
10 bar (int a)
12 return a - 6;
15 __attribute__ ((target ("tune=cortex-a53")))
16 int
17 bam (int a)
19 return a - bar (a);
22 /* { dg-final { scan-assembler-times "//.tune xgene1" 1 } } */
23 /* { dg-final { scan-assembler-times "//.tune cortex-a53" 1 } } */
24 /* { dg-final { scan-assembler-not "thunderx" } } */