Fix warnings for tree formats in gfc_error
[official-gcc.git] / gcc / testsuite / gcc.target / csky / fnargs-1.c
blob5cc85b6ea97eff8961102969cb21b7f6c547cde2
1 /* { dg-do run } */
3 /* Check that a structure argument passed partially in registers and
4 partially on the stack works. */
6 #include <stdlib.h>
7 #include <string.h>
9 struct s {
10 unsigned int i;
11 double d;
12 char s[16];
15 /* Note specifically that, since there are 4 argument registers, the
16 value of ss.d is split between the last argument register and the
17 stack. */
18 void
19 f (struct s *sp, int j, struct s ss, int k)
21 if (sp->i != ss.i
22 || sp->d != ss.d
23 || strcmp (sp->s, ss.s))
24 abort ();
25 if (j != -k)
26 abort ();
29 int
30 main (void)
32 struct s ss;
33 ss.i = 0xdeadbeef;
34 ss.d = 2.71828;
35 strcpy (ss.s, "shazam!");
36 f (&ss, 42, ss, -42);
37 return 0;