shithub: scc

ref: b64ef1259866bf8d967c6df793bc4fb79c0078ba
dir: /cc1/tests/test046.c/

View raw version
/*
name: TEST046
description: Basic test for initializators
error:
output:
V1	I	#N3
G2	V1	"x	(
	#I1
	#I2
	#I3
)
G4	F	"main
{
\
	j	L5	G2	#I1	=I
	r	#I1
L5
	j	L7	G2	'P	#P2	+P	@I	#I2	=I
	r	#I2
L7
	j	L8	G2	'P	#P4	+P	@I	#I3	=I
	r	#I3
L8
	r	#I0
}
*/

int x[3] = {1, 2, 3};

int
main()
{
	if(x[0] != 1) 
		return 1;
	if(x[1] != 2) 
		return 2;
	if(x[2] != 3) 
		return 3;
	return 0;
}