1typedef unsigned short u16;
2typedef          short s16;
3typedef unsigned   int u32;
4typedef            int s32;
5
6u32 ufoo(u32 x)
7{
8	u16 i = ((u16)x) & 0x7fffU;
9	return i;
10}
11
12u32 sfoo(u32 x)
13{
14	s16 i = ((s16)x) & 0x7fff;
15	return i;
16}
17
18/*
19 * check-name: and-extend
20 * check-command: test-linearize -Wno-decl $file
21 *
22 * check-output-ignore
23 * check-output-excludes: trunc\\.
24 * check-output-excludes: zext\\.
25 * check-output-excludes: sext\\.
26 * check-output-contains: and\\.32.*0x7fff
27 */
28