aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/memops/type-punning-flt2int.c
blob: fadaf6876d13356a28a44ded30135b038a2a319f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
union u {
	int i;
	float f;
};

static int foo(void)
{
	union u u = { .f = 0.123 };
	return u.i;
}

/*
 * check-name: type-punning-float-to-int
 * check description: must not infer the int value from the float
 * check-command: test-linearize $file
 *
 * check-output-ignore
 * check-output-contains: load\\.
 */