summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/mips/mips16-attributes-2.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.target/mips/mips16-attributes-2.c')
-rw-r--r--gcc/testsuite/gcc.target/mips/mips16-attributes-2.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/mips/mips16-attributes-2.c b/gcc/testsuite/gcc.target/mips/mips16-attributes-2.c
new file mode 100644
index 000000000..bc81cfa7e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/mips16-attributes-2.c
@@ -0,0 +1,16 @@
+/* { dg-skip-if "" { *-*-* } { "-mflip-mips16" } { "" } } */
+/* { dg-options "(-mips16)" } */
+
+void f1 (void);
+void __attribute__((mips16)) f1 (void) {} /* { dg-error "conflicting" } */
+
+void __attribute__((mips16)) f2 (void);
+void f2 (void) {} /* { dg-error "conflicting" } */
+
+void f3 (void);
+void __attribute__((nomips16)) f3 (void) {} /* { dg-error "conflicting" } */
+
+void __attribute__((nomips16)) f4 (void);
+void f4 (void) {} /* { dg-error "conflicting" } */
+
+void __attribute__((mips16, nomips16)) f5 (void) {} /* { dg-error "cannot have both" } */