Merged with mainline at revision 128810.
[official-gcc.git] / gcc / testsuite / gcc.dg / sms-antideps.c
blob85976d641de95acc08c549bd6773cc671ad904a2
1 /* This test is a reduced test case for a bug that caused
2 bootstrapping with -fmodulo-sched. Related to a broken anti-dep
3 that was not fixed by reg-moves. */
5 /* { dg-do run } */
6 /* { dg-options "-O2 -fmodulo-sched -fmodulo-sched-allow-regmoves" } */
8 #include <stdlib.h>
10 unsigned long long
11 foo (long long ixi, unsigned ctr)
13 unsigned long long irslt = 1;
14 long long ix = ixi;
16 for (; ctr; ctr--)
18 irslt *= ix;
19 ix *= ix;
22 if (irslt != 14348907)
23 abort ();
24 return irslt;
28 int
29 main ()
31 unsigned long long res;
33 res = foo (3, 4);
34 return 0;