1 /* PR tree-optimization/58209 */ 2 3 extern void abort (void); 4 typedef __INTPTR_TYPE__ T; 5 T buf[1024]; 6 7 T * foo(T n)8foo (T n) 9 { 10 if (n == 0) 11 return (T *) buf; 12 T s = (T) foo (n - 1); 13 return (T *) (s + sizeof (T)); 14 } 15 16 T * bar(T n)17bar (T n) 18 { 19 if (n == 0) 20 return buf; 21 return foo (n - 1) + 1; 22 } 23 24 int main()25main () 26 { 27 int i; 28 for (i = 0; i < 27; i++) 29 if (foo (i) != buf + i || bar (i) != buf + i) 30 abort (); 31 return 0; 32 } 33