aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/memops/type-punning-int2flt.c
blob: 061b742352c4ccdeeaf122222267ec2277aad99b (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 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-output-ignore
 * check-output-contains: load\\.
 */