2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / gcc.c-torture / compile / 20020604-1.c
blobef24e1cf1397f005c949f19585fb340016b71666
1 /* The array is too big. */
2 /* { dg-xfail-if "The array too big" { "h8300-*-*" } { "-mno-h" "-mn" } { "" } } */
3 /* { dg-do assemble { xfail m6811-*-* m6812-*-* } } */
5 /* PR c/6957
6 This testcase ICEd at -O2 on IA-32, because
7 (insn 141 139 142 (set (subreg:SF (reg:QI 72) 0)
8 (plus:SF (reg:SF 73)
9 (reg:SF 76))) 525 {*fop_sf_comm_nosse} (insn_list 134 (nil))
10 (expr_list:REG_DEAD (reg:SF 73) (nil)))
11 couldn't be reloaded. */
13 void
14 foo (unsigned int n, int x, int y, unsigned char *z)
16 int a, b;
17 float c[2048][4];
19 switch (x)
21 case 0x1906:
22 a = b = -1;
23 break;
24 case 0x190A:
25 a = b = -1;
26 break;
27 case 0x8049:
28 a = b = -1;
29 break;
30 case 0x1907:
31 a = 1;
32 b = 2;
33 break;
34 default:
35 return;
38 if (a >= 0)
40 unsigned char *d = z;
41 unsigned int i;
42 for (i = 0; i < n; i++)
46 union
48 float r;
49 unsigned int i;
52 e.r = c[i][1];
53 d[a] =
54 ((e.i >= 0x3f7f0000) ? ((int) e.i <
55 0) ? (unsigned char) 0
56 : (unsigned char) 255 : (e.r =
57 e.r * (255.0F / 256.0F) +
58 32768.0F, (unsigned char) e.i));
60 while (0);
61 d += y;
65 if (b >= 0)
67 unsigned char *d = z;
68 unsigned int i;
69 for (i = 0; i < n; i++)
73 union
75 float r;
76 unsigned int i;
79 e.r = c[i][2];
80 d[b] =
81 ((e.i >= 0x3f7f0000) ? ((int) e.i <
82 0) ? (unsigned char) 0
83 : (unsigned char) 255 : (e.r =
84 e.r * (255.0F / 256.0F) +
85 32768.0F, (unsigned char) e.i));
87 while (0);
88 d += y;