1 // RUN: %clang_cc1 %s -triple=x86_64-linux-gnu -S -verify -o -
2 
3 struct S {
4   __attribute__((always_inline, target("avx512f")))
5   void foo(){}
6   __attribute__((always_inline, target("avx512f")))
7   operator int(){ return 0; }
8   __attribute__((always_inline, target("avx512f")))
9   void operator()(){ }
10 
11 };
12 
13 void usage(S & s) {
14   s.foo(); // expected-error {{'foo' requires target feature 'avx512f'}}
15   (void)(int)s; // expected-error {{'operator int' requires target feature 'avx512f'}}
16   s(); // expected-error {{'operator()' requires target feature 'avx512f'}}
17 }
18