1/* PR tree-optimization/53465 */ 2 3extern void abort (); 4 5static const int a[] = { 1, 2 }; 6 7void 8foo (const int *x, int y) 9{ 10 int i; 11 int b = 0; 12 int c; 13 for (i = 0; i < y; i++) 14 { 15 int d = x[i]; 16 if (d == 0) 17 break; 18 if (b && d <= c) 19 abort (); 20 c = d; 21 b = 1; 22 } 23} 24 25int 26main () 27{ 28 foo (a, 2); 29 return 0; 30} 31