Debian Codegraph @

gcc/testsuite/gdc.dg/attr_target1.d

raw
1 // { dg-do compile { target i?86*-*-* x86_64-*-* } }
2
3 import gcc.attributes;
4
5 @target("default")
6 int foo() { return 1; }
7
8 @target("arch=core2", "")
9 int foo2() { return 2; } // { dg-warning "empty string in attribute .target." }
10
11 @target("sse4.2", "", "")
12 int foo3() { return 3; } // { dg-warning "empty string in attribute .target." }
13
14 @target("default")
15 int var = 0; // { dg-warning ".target. attribute ignored" }
16
17 int main()
18 {
19 return foo() + foo2() + foo3();
20 }