1/* Test that sibling call is not used if there is an argument overlap.  */
2
3extern void abort (void);
4
5struct S
6{
7  int a, b, c;
8};
9
10int
11foo2 (struct S x, struct S y)
12{
13  if (x.a != 3 || x.b != 4 || x.c != 5)
14    abort ();
15  if (y.a != 6 || y.b != 7 || y.c != 8)
16    abort ();
17  return 0;
18}
19
20int
21foo3 (struct S x, struct S y, struct S z)
22{
23  foo2 (x, y);
24  if (z.a != 9 || z.b != 10 || z.c != 11)
25    abort ();
26  return 0;
27}
28
29int
30bar2 (struct S x, struct S y)
31{
32  return foo2 (y, x);
33}
34
35int
36bar3 (struct S x, struct S y, struct S z)
37{
38  return foo3 (y, x, z);
39}
40
41int
42baz3 (struct S x, struct S y, struct S z)
43{
44  return foo3 (y, z, x);
45}
46
47int
48main (void)
49{
50  struct S a = { 3, 4, 5 }, b = { 6, 7, 8 }, c = { 9, 10, 11 };
51
52  bar2 (b, a);
53  bar3 (b, a, c);
54  baz3 (c, a, b);
55  return 0;
56}
57