blob: 5e416f4c0cf461a696739746b0f4bededbf4a3eb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
/* { dg-do compile } */
/* { dg-do run } */
/* { dg-options "-Os" } */
unsigned int
foo (unsigned int x)
{
unsigned int r = x;
while (--x)
r *= x;
return r;
}
unsigned long long
bar (unsigned long long x)
{
unsigned long long r = x;
while (--x)
r *= x;
return r;
}
extern void abort (void);
int
main (void)
{
if (foo (5) != 120 || bar (5) != 120)
abort ();
return 0;
}
|