+2016-09-13 Joe Seymour <joe.s@somniumtech.com>
+
+ PR target/70713
+ * config/msp430/msp430.c (msp430_start_function): Emit an error
+ if a function is both weak and specifies an interrupt number.
+
2016-09-13 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/77454
{
char buf[101];
+ /* Interrupt vector sections should be unique, but use of weak
+ functions implies multiple definitions. */
+ if (DECL_WEAK (decl))
+ {
+ error ("argument to interrupt attribute is unsupported for weak functions");
+ }
+
intr_vector = TREE_VALUE (intr_vector);
/* The interrupt attribute has a vector value. Turn this into a
+2016-09-13 Joe Seymour <joe.s@somniumtech.com>
+
+ PR target/70713
+ * gcc.target/msp430/function-attributes-1.c: New test.
+ * gcc.target/msp430/function-attributes-2.c: New test.
+ * gcc.target/msp430/function-attributes-3.c: New test.
+
2016-09-13 Jakub Jelinek <jakub@redhat.com>
* g++.dg/cpp0x/gen-attrs-61.C: New test.
--- /dev/null
+void __attribute__((weak, interrupt))
+weak_interrupt (void) {
+}
+
+void __attribute__((interrupt(11)))
+interrupt_number (void) {
+}
+
+/* { dg-final { scan-assembler-times "__interrupt_vector_" 1 } } */
--- /dev/null
+void __attribute__((weak, interrupt(10)))
+weak_interrupt_number (void) {
+} /* { dg-error "argument to interrupt attribute is unsupported for weak functions" } */
--- /dev/null
+void __attribute__((interrupt("nmi"))) __attribute__((weak))
+interrupt_name_weak (void) {
+} /* { dg-error "argument to interrupt attribute is unsupported for weak functions" } */