summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/execute/991201-1.c
blob: 16595a45d14f827c5b00bd60b9acbec8d84b7c24 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
struct vc_data {
	unsigned long	space;
	unsigned char   vc_palette[16*3];        
};

struct vc {
	struct vc_data *d;
};

struct vc_data a_con;
struct vc vc_cons[63] = { &a_con };
int default_red[16];
int default_grn[16];
int default_blu[16];

extern void bar(int);

void reset_palette(int currcons)
{
	int j, k;
	for (j=k=0; j<16; j++) {
		(vc_cons[currcons].d->vc_palette) [k++] = default_red[j];
		(vc_cons[currcons].d->vc_palette) [k++] = default_grn[j];
		(vc_cons[currcons].d->vc_palette) [k++] = default_blu[j];
	}
	bar(k);
}

void bar(int k)
{
	if (k != 16*3)
		abort();
}

int main()
{
	reset_palette(0);
	exit(0);
}