1f08c3bdfSopenharmony_citypedef	unsigned short		u16;
2f08c3bdfSopenharmony_citypedef	unsigned int		u32;
3f08c3bdfSopenharmony_ci
4f08c3bdfSopenharmony_ciunion u {
5f08c3bdfSopenharmony_ci	u32	a;
6f08c3bdfSopenharmony_ci	u16	b;
7f08c3bdfSopenharmony_ci};
8f08c3bdfSopenharmony_ci
9f08c3bdfSopenharmony_cistruct s {
10f08c3bdfSopenharmony_ci	u32	a;
11f08c3bdfSopenharmony_ci	u16	b;
12f08c3bdfSopenharmony_ci};
13f08c3bdfSopenharmony_ci
14f08c3bdfSopenharmony_ci
15f08c3bdfSopenharmony_civoid bar(u16, u32);
16f08c3bdfSopenharmony_civoid union_to_int(u16 val);
17f08c3bdfSopenharmony_civoid struct_to_int(u16 val);
18f08c3bdfSopenharmony_ci
19f08c3bdfSopenharmony_ci
20f08c3bdfSopenharmony_civoid union_to_int(u16 val)
21f08c3bdfSopenharmony_ci{
22f08c3bdfSopenharmony_ci	union u u;
23f08c3bdfSopenharmony_ci
24f08c3bdfSopenharmony_ci	u.b = val;
25f08c3bdfSopenharmony_ci	bar(u.b, u);
26f08c3bdfSopenharmony_ci}
27f08c3bdfSopenharmony_ci
28f08c3bdfSopenharmony_civoid struct_to_int(u16 val)
29f08c3bdfSopenharmony_ci{
30f08c3bdfSopenharmony_ci	struct s s;
31f08c3bdfSopenharmony_ci
32f08c3bdfSopenharmony_ci	s.b = val;
33f08c3bdfSopenharmony_ci	bar(s.b, s);
34f08c3bdfSopenharmony_ci}
35f08c3bdfSopenharmony_ci
36f08c3bdfSopenharmony_ci/*
37f08c3bdfSopenharmony_ci * check-name: cast-bad 00
38f08c3bdfSopenharmony_ci *
39f08c3bdfSopenharmony_ci * check-error-start
40f08c3bdfSopenharmony_cicast-bad-00.c:25:18: warning: incorrect type in argument 2 (different base types)
41f08c3bdfSopenharmony_cicast-bad-00.c:25:18:    expected unsigned int [usertype]
42f08c3bdfSopenharmony_cicast-bad-00.c:25:18:    got union u [assigned] u
43f08c3bdfSopenharmony_cicast-bad-00.c:33:18: warning: incorrect type in argument 2 (different base types)
44f08c3bdfSopenharmony_cicast-bad-00.c:33:18:    expected unsigned int [usertype]
45f08c3bdfSopenharmony_cicast-bad-00.c:33:18:    got struct s [assigned] s
46f08c3bdfSopenharmony_ci * check-error-end
47f08c3bdfSopenharmony_ci */
48