summaryrefslogtreecommitdiffstats
path: root/test/CodeGen/target-features-error.c
blob: a55163a95d43f967b9035f70d35662782c9ffb25 (plain)
1
2
3
4
5
6
7
// RUN: %clang_cc1 %s -triple=x86_64-linux-gnu -S -verify -o -
int __attribute__((target("avx"), always_inline)) foo(int a) {
  return a + 4;
}
int bar() {
  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'}}
}