aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/msp430
diff options
context:
space:
mode:
authorJozef Lawrynowicz <jozef.l@somniumtech.com>2017-08-29 13:20:54 +0000
committerNick Clifton <nickc@gcc.gnu.org>2017-08-29 13:20:54 +0000
commit10bcba61fcfb0cd7f7a2ba64f1a14c62e3512eca (patch)
treefd759dda7c8b5631184e9c73ef69ce837b65adc3 /gcc/config/msp430
parent12d847913a96fc78111f22f4caea9bdf707b8566 (diff)
downloadgcc-10bcba61fcfb0cd7f7a2ba64f1a14c62e3512eca.zip
gcc-10bcba61fcfb0cd7f7a2ba64f1a14c62e3512eca.tar.gz
gcc-10bcba61fcfb0cd7f7a2ba64f1a14c62e3512eca.tar.bz2
re PR target/80993 ([msp430] __attribute__((interrupt)) should imply __attribute__((used)))
PR target/80993 * gcc/config/msp430/msp430.c (msp430_attr): Mark interrupt handlers as used. From-SVN: r251410
Diffstat (limited to 'gcc/config/msp430')
-rw-r--r--gcc/config/msp430/msp430.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/config/msp430/msp430.c b/gcc/config/msp430/msp430.c
index 2b4427d..48fc12d 100644
--- a/gcc/config/msp430/msp430.c
+++ b/gcc/config/msp430/msp430.c
@@ -1904,6 +1904,10 @@ msp430_attr (tree * node,
if (! TREE_PUBLIC (* node))
message = "interrupt handlers cannot be static";
+
+ /* Ensure interrupt handlers never get optimised out. */
+ TREE_USED (* node) = 1;
+ DECL_PRESERVE_P (* node) = 1;
}
else if (TREE_NAME_EQ (name, ATTR_REENT))
{