Implement C _FloatN, _FloatNx types.
[official-gcc.git] / gcc / testsuite / gcc.dg / torture / parm-coalesce.c
blobdbd81c1ba213f73e7556cc7ef9bd53e2c246765f
1 /* { dg-do run } */
3 #include <stdlib.h>
5 /* Make sure we don't coalesce both incoming parms, one whose incoming
6 value is unused, to the same location, so as to overwrite one of
7 them with the incoming value of the other. */
9 int __attribute__((noinline, noclone))
10 foo (int i, int j)
12 j = i; /* The incoming value for J is unused. */
13 i = 2;
14 if (j)
15 j++;
16 j += i + 1;
17 return j;
20 /* Same as foo, but with swapped parameters. */
21 int __attribute__((noinline, noclone))
22 bar (int j, int i)
24 j = i; /* The incoming value for J is unused. */
25 i = 2;
26 if (j)
27 j++;
28 j += i + 1;
29 return j;
32 int
33 main (void)
35 if (foo (0, 1) != 3)
36 abort ();
37 if (bar (1, 0) != 3)
38 abort ();
39 return 0;