<commit_before>// RUN: %ocheck 0 %s

struct A
{
	int x : 3;
	int : 0; // forces y to align on boundary of next bitfield type
	int y : 4;
};

chk(int a, int b)
{
	if(a != 3 || b != 5)
		abort();
}

main()
{
	struct A a;

	a.x = 3;
	a.y = 5;

	chk(a.x, a.y);

	// should be packed like ints
	chk(0[(int *)&a], 1[(int *)&a]);

	return 0;
}<commit_msg>Fixed uninitialised bitfield-padding in test<commit_after>// RUN: %ocheck 0 %s

struct A
{
	int x : 3;
	int : 0; // forces y to align on boundary of next bitfield type
	int y : 4;
};

chk(int a, int b)
{
	if(a != 3 || b != 5)
		abort();
}

main()
{
	struct A a;

	memset(&a, 0, sizeof a);

	a.x = 3;
	a.y = 5;

	chk(a.x, a.y);

	/* should be packed like ints
	 * note that this relies on the memset() above,
	 * as bitfields don't take part in initialisation,
	 * even = { 0 }.
	 */
	chk(0[(int *)&a], 1[(int *)&a]);

	return 0;
}
{'fraction_non_alphanumeric': 0.1856492027334852, 'fraction_numerical': 0.02733485193621868, 'mean_word_length': 2.5877551020408163, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1972852', 'n_tokens_mistral': 416, 'n_tokens_neox': 386, 'n_words': 135}