shithub: scc

ref: 6b1309ac40e3f1842f42b5fbd995b40dbf8e3932
dir: /tests/cc/execute/0186-dec_ary.c/

View raw version
struct node {
	int index;
};

struct node nodes[2];

int
main(void)
{
	int d = 1, c;

	d = 1;
	c = nodes[--d].index++;
	if (d != 0 || nodes[0].index != 1)
		return 1;

	d = -1;
	c = nodes[++d].index--;
	if (d != 0 || nodes[0].index != 0)
		return 2;

	return 0;
}