summaryrefslogtreecommitdiffstats
path: root/test/Sema/attr-target.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Sema/attr-target.c')
-rw-r--r--test/Sema/attr-target.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/Sema/attr-target.c b/test/Sema/attr-target.c
new file mode 100644
index 0000000..6c6b461
--- /dev/null
+++ b/test/Sema/attr-target.c
@@ -0,0 +1,8 @@
+// RUN: %clang_cc1 -triple x86_64-linux-gnu -fsyntax-only -verify %s
+
+int __attribute__((target("avx,sse4.2,arch=ivybridge"))) foo() { return 4; }
+int __attribute__((target())) bar() { return 4; } //expected-error {{'target' attribute takes one argument}}
+int __attribute__((target("tune=sandybridge"))) baz() { return 4; } //expected-warning {{Ignoring unsupported 'tune=' in the target attribute string}}
+int __attribute__((target("fpmath=387"))) walrus() { return 4; } //expected-warning {{Ignoring unsupported 'fpmath=' in the target attribute string}}
+
+
OpenPOWER on IntegriCloud