1 /* PR optimization/12799 */ 2 /* Origin: Pratap Subrahmanyam <pratap@vmware.com> */ 3 4 /* { dg-do run } */ 5 /* { dg-options "-O2" } */ 6 /* { dg-options "-O2 -march=i686" { target { { i686-*-* x86_64-*-* } && ia32 } } } */ 7 8 /* Verify that reload_cse_move2add doesn't add unexpected CLOBBERs. */ 9 10 extern void abort(void); 11 12 int loo = 1; 13 InlineFunc(void)14__inline__ char InlineFunc(void) 15 { 16 return __builtin_expect(!!(loo == 1), 1); 17 } 18 FooBar(void)19int FooBar(void) 20 { 21 int i; 22 int var1 = InlineFunc() ? 2046 : 1023; 23 int var2 = InlineFunc() ? 512 : 1024; 24 25 for (i = 0; i < var1; i++) 26 ; 27 28 if (InlineFunc() && var2 != 512) 29 abort(); 30 31 return 0; 32 } 33 main(void)34int main(void) 35 { 36 return FooBar(); 37 } 38