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