8sa1-gcc/gcc/testsuite/gcc.c-torture/execute/multdi-1.c
Roger Sayle 888d65b5a8 re PR target/9348 ([HP-UX] error in int to unsigned long multiplication)
PR target/9348
	* expr.c (expand_expr_real) <MULT_EXPR>:  When performing widening
	multiplies with a multiplication of the wrong signedness, its the
	signedness of the multiplication that we've performed that needs to
	be passed to expand_mult_highpart_adjust.  Avoid emitting a nop-move
	if expand_mult_highpart_adjust places the result in target.

	* gcc.c-torture/execute/multdi-1.c: New test case.

From-SVN: r77192
2004-02-03 21:31:00 +00:00

21 lines
249 B
C

/* PR target/9348 */
#define u_l_l unsigned long long
#define l_l long long
l_l mpy_res;
u_l_l mpy (long a, long b)
{
return (u_l_l) a * (u_l_l) b;
}
int main(void)
{
mpy_res = mpy(1,-1);
if (mpy_res != -1LL)
abort ();
return 0;
}