libstdc++: Move gcc.gnu.org and sourceware.org links to https
[official-gcc.git] / gcc / testsuite / gcc.target / arm / pr94743-1-hard.c
blobb4c961e288f486d297cd7dacc88adfc35cf62814
1 /* PR target/94743 */
2 /* { dg-do compile } */
3 /* { dg-skip-if "do not override -mfloat-abi" { *-*-* } { "-mfloat-abi=*" } {"-mfloat-abi=hard" } } */
4 /* { dg-require-effective-target arm_vfp_ok } */
5 /* { dg-add-options arm_vfp } */
6 /* Make sure with use -mfloat-abi=hard. */
7 /* { dg-additional-options "-mfloat-abi=hard" } */
9 /* Check that we emit a warning when compiling an IRQ handler without
10 -mgeneral-regs-only. */
11 typedef struct {
12 double fpdata[32];
13 } dummy_t;
15 dummy_t global_d;
16 dummy_t global_d1;
18 /* This function may clobber VFP registers. */
19 __attribute__ ((interrupt("IRQ"))) void IRQ_HDLR_Test(void)
20 { /* { dg-warning { FP registers might be clobbered despite 'interrupt' attribute: compile with '-mgeneral-regs-only'} "" { target *-*-* } . } */
21 global_d.fpdata[3] += global_d.fpdata[3] * global_d1.fpdata[3];
24 /* This function does not need to clobber VFP registers. */
25 /* Do we want to emit a (useless?) warning? */
26 __attribute__ ((interrupt("IRQ"))) void IRQ_HDLR_Test2(void)
27 { /* { dg-warning { FP registers might be clobbered despite 'interrupt' attribute: compile with '-mgeneral-regs-only'} "" { target *-*-* } . } */
28 global_d.fpdata[3] = 1.0;