aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/expand/compound-literal.c
blob: 7401b0191df41dd88a4e1b9482358e544ad0f139 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#define SAME_TYPE(A, B)	\
	__builtin_types_compatible_p(A, B)

struct s {
	int i;
};

static void foo(struct s *p)
{
	*p = (struct s) { .i = SAME_TYPE(int, int), };
}

/*
 * check-name: compound-literal
 * check-command: test-linearize $file
 * check-known-to-fail
 *
 * check-output-start
foo:
.L0:
	<entry-point>
	store.32    $1 -> 0[%arg1]
	ret


 * check-output-end
 */