11f5207b7SJohn Levon typedef unsigned int u32; 21f5207b7SJohn Levon smulm1(int a)31f5207b7SJohn Levonint smulm1(int a) { return a * -1; } umulm1(u32 a)41f5207b7SJohn Levonu32 umulm1(u32 a) { return a * (u32) -1; } sdivm1(int a)51f5207b7SJohn Levonint sdivm1(int a) { return a / -1; } udivm1(u32 a)61f5207b7SJohn Levonu32 udivm1(u32 a) { return a / (u32) -1; } 71f5207b7SJohn Levon 81f5207b7SJohn Levon /* 91f5207b7SJohn Levon * check-name: muldiv-minus-one 101f5207b7SJohn Levon * check-command: test-linearize -Wno-decl $file 111f5207b7SJohn Levon * check-output-ignore 121f5207b7SJohn Levon * 131f5207b7SJohn Levon * check-output-excludes: mul[us]\\. 141f5207b7SJohn Levon * check-output-excludes: divs\\. 151f5207b7SJohn Levon * check-output-contains: neg\\. 161f5207b7SJohn Levon * check-output-contains: divu\\. 17*c85f09ccSJohn Levon * check-output-pattern(3): neg\\. 181f5207b7SJohn Levon */ 19