PR middle-end/27945
[official-gcc.git] / gcc / testsuite / gcc.dg / 20031102-1.c
blob5a02a704a26f7c6c9d2c0c829293bce2208023ef
1 /* PR optimization/12799 */
2 /* Origin: Pratap Subrahmanyam <pratap@vmware.com> */
4 /* { dg-do run } */
5 /* { dg-options "-O2" } */
6 /* { dg-options "-O2 -march=i686" { target { { i686-*-* x86_64-*-* } && ilp32 } } } */
8 /* Verify that reload_cse_move2add doesn't add unexpected CLOBBERs. */
10 extern void abort(void);
12 int loo = 1;
14 __inline__ char InlineFunc(void)
16 return __builtin_expect(!!(loo == 1), 1);
19 int FooBar(void)
21 int i;
22 int var1 = InlineFunc() ? 2046 : 1023;
23 int var2 = InlineFunc() ? 512 : 1024;
25 for (i = 0; i < var1; i++)
28 if (InlineFunc() && var2 != 512)
29 abort();
31 return 0;
34 int main(void)
36 return FooBar();