aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/arm/pr94743-3.c
blob: 6b8ed2b8dfacd3fe21d91b7b426a5f76757167ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* PR target/94743 */
/* { dg-do compile } */
/* Thumb1 mode not supported for interrupt routines.  */
/* { dg-require-effective-target arm32 } */
/* { dg-skip-if "do not override -mfloat-abi" { *-*-* } { "-mfloat-abi=*" } {"-mfloat-abi=soft" } } */
/* { dg-options "-mgeneral-regs-only -mfloat-abi=soft" } */

/* Check that we do not emit a warning when compiling an IRQ handler
   with -mgeneral-regs-only even when using floating-point data.  */
typedef struct {
  /* Since we use -mfloat=abi=soft, this will generate calls to
     libgcc, but won't clobber VFP registers.  */
  double fpdata[32];
} dummy_t;

dummy_t global_d;
dummy_t global_d1;

/* This function does not clobber VFP registers.  */
__attribute__ ((interrupt("IRQ"))) void IRQ_HDLR_Test(void)
{
  global_d.fpdata[3] += global_d.fpdata[3] * global_d1.fpdata[3];
}