aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/expand/constant-union-int2flt.c
blob: 16ce1c6f3fe39e1e7b38ab2c5811941bef3a75f8 (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: constant-union-int-to-float
 * check description: must not infer the float value from the int
 * check-command: test-linearize -fdump-ir $file
 *
 * check-output-ignore
 * check-output-pattern(1): load\\.
 */