diff options
author | Joe Seymour <joe.s@somniumtech.com> | 2016-09-13 20:06:47 +0000 |
---|---|---|
committer | DJ Delorie <dj@gcc.gnu.org> | 2016-09-13 16:06:47 -0400 |
commit | a713b234edc3b9e76c9abc593a5872415d7d225a (patch) | |
tree | 61d322b2d24dced2079d0bef205cefe3548fede8 /gcc/config/msp430/msp430.c | |
parent | 8e14a10cab52b37c56019b738011f8e4cef28d5a (diff) | |
download | gcc-a713b234edc3b9e76c9abc593a5872415d7d225a.zip gcc-a713b234edc3b9e76c9abc593a5872415d7d225a.tar.gz gcc-a713b234edc3b9e76c9abc593a5872415d7d225a.tar.bz2 |
re PR target/70713 (msp430 interrupt attribute prevents overriding weak symbols)
2016-09-13 Joe Seymour <joe.s@somniumtech.com>
gcc/
PR target/70713
* config/msp430/msp430.c (msp430_start_function): Emit an error
if a function is both weak and specifies an interrupt number.
gcc/testsuite/
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.
From-SVN: r240123
Diffstat (limited to 'gcc/config/msp430/msp430.c')
-rw-r--r-- | gcc/config/msp430/msp430.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/config/msp430/msp430.c b/gcc/config/msp430/msp430.c index dba4d19..c40d2da 100644 --- a/gcc/config/msp430/msp430.c +++ b/gcc/config/msp430/msp430.c @@ -2108,6 +2108,13 @@ msp430_start_function (FILE *file, const char *name, tree decl) { 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 |