diff options
Diffstat (limited to 'test/CodeGen/target-features-no-error.c')
-rw-r--r-- | test/CodeGen/target-features-no-error.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/CodeGen/target-features-no-error.c b/test/CodeGen/target-features-no-error.c new file mode 100644 index 0000000..b6283b6 --- /dev/null +++ b/test/CodeGen/target-features-no-error.c @@ -0,0 +1,9 @@ +// RUN: %clang_cc1 %s -triple=x86_64-linux-gnu -emit-llvm -o - -target-feature -sse2 + +// Verify that negative features don't cause additional requirements on the inline function. +int __attribute__((target("sse"), always_inline)) foo(int a) { + return a + 4; +} +int bar() { + return foo(4); // expected-no-diagnostics +} |