aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/memops/type-punning-int2flt.c
blob: c05ce252f3057581f7ddcd050dbe7d1052041be7 (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 float foo(void)
{
	union u u = { .i = 3 };
	return u.f;
}

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