Commit 10bcba61 by Jozef Lawrynowicz Committed by Nick Clifton

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
parent 12d84791
2017-08-29 Jozef Lawrynowicz <jozef.l@somniumtech.com>
PR target/80993
* gcc/config/msp430/msp430.c (msp430_attr): Mark interrupt
handlers as used.
2017-08-29 Richard Biener <rguenther@suse.de>
* dwarf2out.c (add_dwarf_attr): When checking is enabled verify
......
......@@ -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))
{
......
/* { dg-do link } */
/* { dg-options "--save-temps -msim -flto -Os" } */
/* { dg-final { scan-file "pr80993.exe.ltrans0.s" no_ref_handler } } */
void __attribute__((interrupt)) no_ref_handler (void)
{
while (1);
}
int main (void)
{
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment