1 // RUN: %clang_cc1 %s -triple=x86_64-linux-gnu -S -verify -o - -DTEST1
2 // RUN: %clang_cc1 %s -triple=x86_64-linux-gnu -S -verify -o - -DTEST2
3 // RUN: %clang_cc1 %s -triple=x86_64-linux-gnu -S -verify -o - -DTEST3
4 // RUN: %clang_cc1 %s -triple=x86_64-linux-gnu -S -verify -o - -DTEST4
7 __attribute__((always_inline
, target("avx512f")))
9 __attribute__((always_inline
, target("avx512f")))
10 operator int(){ return 0; }
11 __attribute__((always_inline
, target("avx512f")))
15 __attribute__((always_inline
, target("avx512f")))
21 s
.foo(); // expected-error {{'foo' requires target feature 'avx512f'}}
22 (void)(int)s
; // expected-error {{'operator int' requires target feature 'avx512f'}}
23 s(); // expected-error {{'operator()' requires target feature 'avx512f'}}
24 free_func(); // expected-error{{'free_func' requires target feature 'avx512f'}}
30 __attribute__((target("avx512f")))
37 s
.foo(); // expected-error {{'foo' requires target feature 'avx512f'}}
38 (void)(int) s
; // expected-error {{'operator int' requires target feature 'avx512f'}}
39 s(); // expected-error {{'operator()' requires target feature 'avx512f'}}
40 free_func(); // expected-error{{'free_func' requires target feature 'avx512f'}}
48 [&s
] () __attribute__((target("avx512f"))) {
56 s
.foo(); // expected-error {{'foo' requires target feature 'avx512f'}}
57 (void)(int) s
; // expected-error {{'operator int' requires target feature 'avx512f'}}
58 s(); // expected-error {{'operator()' requires target feature 'avx512f'}}
59 free_func(); // expected-error{{'free_func' requires target feature 'avx512f'}}
67 __attribute__((always_inline
, target("avx512f"))) CtorAndDTor();
68 __attribute__((always_inline
, target("avx512f"))) ~CtorAndDTor();
72 //expected-error@+1{{'CtorAndDTor' requires target feature 'avx512f'}}
75 //expected-error@+1{{'CtorAndDTor' requires target feature 'avx512f'}}
77 //expected-error@+1{{'~CtorAndDTor' requires target feature 'avx512f'}}
80 // FIXME: These need to be given a line number, however there's no good way
81 // to get to the SourceLocation of anything by the time we're doing CodeGen
83 //expected-error@*{{'~CtorAndDTor' requires target feature 'avx512f'}}
84 //expected-error@*{{'~CtorAndDTor' requires target feature 'avx512f'}}