Update concepts branch to revision 131834
[official-gcc.git] / gcc / testsuite / gcc.c-torture / compile / 20020604-1.c
blob17b9b2165bac15756685069bcb66c1d7b672e108
1 /* { dg-do assemble } */
2 /* { dg-xfail-if "The array is too big" { "m6811-*-* m6812-*-*" } { "*" } { "" } } */
3 /* { dg-skip-if "The array is too big" { "avr-*-*" } { "*" } { "" } } */
4 /* { dg-xfail-if "The array too big" { "h8300-*-*" } { "-mno-h" "-mn" } { "" } } */
5 /* { dg-skip-if "" { m32c-*-* } { } { } } */
7 /* PR c/6957
8 This testcase ICEd at -O2 on IA-32, because
9 (insn 141 139 142 (set (subreg:SF (reg:QI 72) 0)
10 (plus:SF (reg:SF 73)
11 (reg:SF 76))) 525 {*fop_sf_comm_nosse} (insn_list 134 (nil))
12 (expr_list:REG_DEAD (reg:SF 73) (nil)))
13 couldn't be reloaded. */
15 void
16 foo (unsigned int n, int x, int y, unsigned char *z)
18 int a, b;
19 float c[2048][4];
21 switch (x)
23 case 0x1906:
24 a = b = -1;
25 break;
26 case 0x190A:
27 a = b = -1;
28 break;
29 case 0x8049:
30 a = b = -1;
31 break;
32 case 0x1907:
33 a = 1;
34 b = 2;
35 break;
36 default:
37 return;
40 if (a >= 0)
42 unsigned char *d = z;
43 unsigned int i;
44 for (i = 0; i < n; i++)
48 union
50 float r;
51 unsigned int i;
54 e.r = c[i][1];
55 d[a] =
56 ((e.i >= 0x3f7f0000) ? ((int) e.i <
57 0) ? (unsigned char) 0
58 : (unsigned char) 255 : (e.r =
59 e.r * (255.0F / 256.0F) +
60 32768.0F, (unsigned char) e.i));
62 while (0);
63 d += y;
67 if (b >= 0)
69 unsigned char *d = z;
70 unsigned int i;
71 for (i = 0; i < n; i++)
75 union
77 float r;
78 unsigned int i;
81 e.r = c[i][2];
82 d[b] =
83 ((e.i >= 0x3f7f0000) ? ((int) e.i <
84 0) ? (unsigned char) 0
85 : (unsigned char) 255 : (e.r =
86 e.r * (255.0F / 256.0F) +
87 32768.0F, (unsigned char) e.i));
89 while (0);
90 d += y;