blob: c4b4dc4be3fc0d71b38d63510d52749ab68ddfb7 (
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
28
29
|
#ifdef __SIZEOF_INT__ == 4
typedef unsigned int u32;
#endif
#ifdef __SIZEOF_SHORT__ == 2
typedef unsigned short u16;
#endif
union u {
u32 a;
u16 b;
};
void bar(u16, union u);
void foo(u16 val)
{
union u u;
u.b = val;
bar(u.b, u);
}
/*
* check-name: short-load
* check-command: test-linearize -Wno-decl -fdump-ir=mem2reg $file
* check-output-ignore
* check-output-contains: load\\.32
*/
|