xref: /llvm-project/clang/test/CodeGen/target-features-error.c (revision 46b0d0eef9e0a7290851cce0d44002b750584f1b)
1 // RUN: %clang_cc1 %s -triple=x86_64-linux-gnu -S -verify -o -
foo(int a)2 int __attribute__((target("avx"), always_inline)) foo(int a) {
3   return a + 4;
4 }
bar(void)5 int bar(void) {
6   return foo(4); // expected-error {{always_inline function 'foo' requires target feature 'avx', but would be inlined into function 'bar' that is compiled without support for 'avx'}}
7 }
8