diff options
Diffstat (limited to 'test/CodeGen/target-features-error.c')
-rw-r--r-- | test/CodeGen/target-features-error.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/CodeGen/target-features-error.c b/test/CodeGen/target-features-error.c new file mode 100644 index 0000000..518f6e6 --- /dev/null +++ b/test/CodeGen/target-features-error.c @@ -0,0 +1,8 @@ +// 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 'sse4.2', but would be inlined into function 'bar' that is compiled without support for 'sse4.2'}} +} + |