Fix unused warnings.
[official-gcc/graphite-test-results.git] / gcc / testsuite / gcc.c-torture / execute / 20080719-1.c
blob694abcbf9851bbc563578a30c4ea4972ba5a58c8
1 typedef unsigned int u32;
3 static const u32 deadfish = 0xdeadf155;
5 static const u32 cfb_tab8_be[] = {
6 0x00000000,0x000000ff,0x0000ff00,0x0000ffff,
7 0x00ff0000,0x00ff00ff,0x00ffff00,0x00ffffff,
8 0xff000000,0xff0000ff,0xff00ff00,0xff00ffff,
9 0xffff0000,0xffff00ff,0xffffff00,0xffffffff
12 static const u32 cfb_tab8_le[] = {
13 0x00000000,0xff000000,0x00ff0000,0xffff0000,
14 0x0000ff00,0xff00ff00,0x00ffff00,0xffffff00,
15 0x000000ff,0xff0000ff,0x00ff00ff,0xffff00ff,
16 0x0000ffff,0xff00ffff,0x00ffffff,0xffffffff
19 static const u32 cfb_tab16_be[] = {
20 0x00000000, 0x0000ffff, 0xffff0000, 0xffffffff
23 static const u32 cfb_tab16_le[] = {
24 0x00000000, 0xffff0000, 0x0000ffff, 0xffffffff
27 static const u32 cfb_tab32[] = {
28 0x00000000, 0xffffffff
36 const u32 *xxx(int bpp)
38 const u32 *tab;
40 if (0) return &deadfish;
42 switch (bpp) {
43 case 8:
44 tab = cfb_tab8_be;
45 break;
46 case 16:
47 tab = cfb_tab16_be;
48 break;
49 case 32:
50 default:
51 tab = cfb_tab32;
52 break;
55 return tab;
58 int main(void)
60 const u32 *a = xxx(8);
61 int b = a[0];
62 if (b != cfb_tab8_be[0])
63 __builtin_abort ();
64 return 0;