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

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

/*
 * check-name: constant-union-float-to-int
 * check description: must not infer the int value from the float
 * check-command: test-linearize -fdump-ir $file
 * check-known-to-fail
 *
 * check-output-ignore
 * check-output-pattern(1): setfval\\.
 * check-output-pattern(1): load\\.
 */