* gcc.dg/stack-check-5.c: Skip with -fstack-protector.
[official-gcc.git] / gcc / testsuite / gcc.dg / 20031102-1.c
blobb50434feff4413a1d5cb46bf54793a3aa69068b9
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 { { i?86-*-* x86_64-*-* } && ia32 } } } */
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();