msg_121.c revision 1.4
11.4Srillig/*	$NetBSD: msg_121.c,v 1.4 2021/04/06 21:44:12 rillig Exp $	*/
21.1Srillig# 3 "msg_121.c"
31.1Srillig
41.1Srillig// Test for message: negative shift [121]
51.1Srillig
61.2Srilligint
71.2Srilligexample(int x)
81.2Srillig{
91.3Srillig	return x << (3 - 5);		/* expect: 121 */
101.2Srillig}
111.4Srillig
121.4Srilligvoid /*ARGSUSED*/
131.4Srilligshift_by_double(int x, double amount)
141.4Srillig{
151.4Srillig	/*
161.4Srillig	 * This is already caught by typeok_scalar, so it doesn't reach
171.4Srillig	 * typeok_shift via typeok_op.
181.4Srillig	 */
191.4Srillig	return x << amount;		/* expect: incompatible types */
201.4Srillig}
21