aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/msp430/static-interrupts.c
blob: 06d9ea694af557777931b4745118d68c753e1394 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/* { dg-do compile } */
/* { dg-options "-Os" } */
/* { dg-final { scan-assembler-times "__interrupt_vector_" 4 } } */

/* Test that interrupts aren't optimised out and that "__interrupt__" and
   "interrupt" can be used interchangeably.  */

static void __attribute__((interrupt(1)))
isr_static (void)
{
}

static void __attribute__((__interrupt__(2)))
isr_static_alt (void)
{
}

void __attribute__((interrupt(3)))
isr_global (void)
{
}

void __attribute__((__interrupt__(4)))
isr_global_alt (void)
{
}