Add _FloatN, _FloatNx tests for __builtin_fpclassify.
[official-gcc.git] / gcc / testsuite / gcc.dg / torture / pr33848.c
blobdb6060253eb2712326b557acf4e543bf9576f2de
1 /* &&foo should be hoisted, but on most targets, excess register pressure
2 forces it to be rematerialized before "data != &&foo". On targets that
3 have a "branch if registers are equal" instruction, this leads to the
4 branch having two LABEL_REFs: one for the branch target and one for
5 &&foo. When reloading &&foo into a register, reload would wrongly
6 say that &&foo was the target of the branch, and the real target would
7 then be removed as dead. */
8 /* { dg-do link } */
9 /* { dg-require-effective-target label_values } */
10 #define NVARS 30
11 #define MULTI(X) \
12 X( 0), X( 1), X( 2), X( 3), X( 4), X( 5), X( 6), X( 7), X( 8), X( 9), \
13 X(10), X(11), X(12), X(13), X(14), X(15), X(16), X(17), X(18), X(19), \
14 X(20), X(21), X(22), X(23), X(24), X(25), X(26), X(27), X(28), X(29)
16 #define DECLARE(INDEX) i##INDEX = gv[INDEX]
17 #define COPY(INDEX) gv[INDEX] = i##INDEX
19 volatile int gv[NVARS];
20 void *volatile data;
22 int
23 main (void)
25 __label__ foo;
27 if (gv[0] == 1)
28 goto foo;
29 data = &&foo;
32 int MULTI (DECLARE);
33 MULTI (COPY);
34 MULTI (COPY);
35 MULTI (COPY);
36 if (data != &&foo)
37 gv[0] = 1;
38 else
39 gv[1] = 2;
41 while (gv[0] > 0);
42 foo:
43 return 0;