blob: 5ecc0c716bae2c4598988eee561e93b6cabb33f3 [file] [log] [blame]
/* { dg-do run } */
/* { dg-options "-fwrapv" } */
void foo( unsigned long long bb, unsigned short tn, unsigned e, unsigned* w );
void foo( unsigned long long bb, unsigned short tn, unsigned e, unsigned* w )
{
unsigned n = tn + bb;
do {
e = (e > n) ? e : *w;
n -= (e > n) ? n : e;
if (*w)
*w = 0;
} while ( n );
}
int main()
{
unsigned w = 0;
foo( 0, 0, 0, &w );
return 0;
}