[PATCH, GCC/ARM, 6/10] Clear GPRs inline when calling nscall function
[official-gcc.git] / gcc / testsuite / gcc.target / arm / pr59923.c
blob7182810cc74ffdf0eece556c34e598f71230f603
1 /* PR target/59923 */
2 /* { dg-do compile } */
3 /* { dg-skip-if "-mpure-code supports M-profile only" { *-*-* } { "-mpure-code" } } */
4 /* { dg-require-effective-target arm_thumb2_ok } */
5 /* { dg-options "-O2 -mcpu=cortex-a15 -fno-strict-aliasing -mthumb -g" } */
7 struct S
9 void *s;
10 struct T { unsigned short a; unsigned char b[4], c[4]; } *t;
11 } s;
12 void bar (void *);
14 void
15 foo (struct S *x, int *y)
17 if (*y > 0)
18 return;
19 else if (x->t->b[0] == 0x43 && x->t->b[1] == 0x6d && x->t->c[0] == 1)
20 x->s = &s;
21 else
22 *y = 16384;
23 if (*y > 0)
24 bar (x);