summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/funcspec-4.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.target/i386/funcspec-4.c')
-rw-r--r--gcc/testsuite/gcc.target/i386/funcspec-4.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/i386/funcspec-4.c b/gcc/testsuite/gcc.target/i386/funcspec-4.c
new file mode 100644
index 00000000000..71251c314bb
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/funcspec-4.c
@@ -0,0 +1,14 @@
+/* Test some error conditions with function specific options. */
+/* { dg-do compile } */
+
+/* no sse500 switch */
+extern void error1 (void) __attribute__((__option__("sse500"))); /* { dg-error "unknown" } */
+
+/* Multiple arch switches */
+extern void error2 (void) __attribute__((__option__("arch=core2,arch=k8"))); /* { dg-error "already specified" } */
+
+/* Unknown tune target */
+extern void error3 (void) __attribute__((__option__("tune=foobar"))); /* { dg-error "bad value" } */
+
+/* option on a variable */
+extern int error4 __attribute__((__option__("sse2"))); /* { dg-warning "ignored" } */