2014-07-29 Ed Smith-Rowland <3dw4rd@verizon.net>
[official-gcc.git] / gcc / testsuite / gcc.dg / pr27003.c
blob5e416f4c0cf461a696739746b0f4bededbf4a3eb
1 /* { dg-do compile } */
2 /* { dg-do run } */
3 /* { dg-options "-Os" } */
5 unsigned int
6 foo (unsigned int x)
8 unsigned int r = x;
9 while (--x)
10 r *= x;
11 return r;
14 unsigned long long
15 bar (unsigned long long x)
17 unsigned long long r = x;
18 while (--x)
19 r *= x;
20 return r;
23 extern void abort (void);
25 int
26 main (void)
28 if (foo (5) != 120 || bar (5) != 120)
29 abort ();
30 return 0;