]>
Commit | Line | Data |
---|---|---|
5384b728 | 1 | 2002-06-04 Jakub Jelinek <jakub@redhat.com> |
2 | ||
3 | * gcc.c-torture/compile/20020604-1.c: New test. | |
4 | ||
5 | --- gcc/testsuite/gcc.c-torture/compile/20020604-1.c.jj Thu Apr 11 16:25:15 2002 | |
6 | +++ gcc/testsuite/gcc.c-torture/compile/20020604-1.c Mon Jun 3 17:43:12 2002 | |
7 | @@ -0,0 +1,86 @@ | |
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. */ | |
14 | + | |
15 | +void | |
16 | +foo (unsigned int n, int x, int y, unsigned char *z) | |
17 | +{ | |
18 | + int a, b; | |
19 | + float c[2048][4]; | |
20 | + | |
21 | + switch (x) | |
22 | + { | |
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; | |
38 | + } | |
39 | + | |
40 | + if (a >= 0) | |
41 | + { | |
42 | + unsigned char *d = z; | |
43 | + unsigned int i; | |
44 | + for (i = 0; i < n; i++) | |
45 | + { | |
46 | + do | |
47 | + { | |
48 | + union | |
49 | + { | |
50 | + float r; | |
51 | + unsigned int i; | |
52 | + } | |
53 | + e; | |
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)); | |
61 | + } | |
62 | + while (0); | |
63 | + d += y; | |
64 | + } | |
65 | + } | |
66 | + | |
67 | + if (b >= 0) | |
68 | + { | |
69 | + unsigned char *d = z; | |
70 | + unsigned int i; | |
71 | + for (i = 0; i < n; i++) | |
72 | + { | |
73 | + do | |
74 | + { | |
75 | + union | |
76 | + { | |
77 | + float r; | |
78 | + unsigned int i; | |
79 | + } | |
80 | + e; | |
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)); | |
88 | + } | |
89 | + while (0); | |
90 | + d += y; | |
91 | + } | |
92 | + } | |
93 | +} |