check_deref: use add_dereference_hook()
[smatch.git] / validation / expand / compound-literal.c
blob034164bca840f97b3621ca460fc1c800b6ef9594
1 #define SAME_TYPE(A, B) \
2 __builtin_types_compatible_p(A, B)
4 struct s {
5 int i;
6 };
8 static void foo(struct s *p)
10 *p = (struct s) { .i = SAME_TYPE(int, int), };
14 * check-name: compound-literal
15 * check-command: test-linearize $file
17 * check-output-start
18 foo:
19 .L0:
20 <entry-point>
21 store.32 $1 -> 0[%arg1]
22 ret
25 * check-output-end