blob: a28d01f22b92e8ae50dd275cfcfc269089598d95 (
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
|
union u {
int i;
struct s {
int a;
} s;
};
int foo(void)
{
struct s s = { 3 };
union u u = (union u)s;
return u.s.a;
}
/*
* check-name: union-cast
* check-command: test-linearize -Wno-decl -fdump-ir $file
* check-known-to-fail
*
* check-output-ignore
* check-output-excludes: load\\.
*
* check-error-start
union-cast.c:11:22: warning: cast to non-scalar
union-cast.c:11:22: warning: cast from non-scalar
* check-error-end
*/
|