aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/memops/type-punning-flt2int.c
blob: a76c6c1da53476d8aa4e5f3c450c70c703c34965 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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-known-to-fail
 *
 * check-output-ignore
 * check-output-contains: load\\.
 */