Merge from branches/gcc-4_8-branch up to rev 207411.
[official-gcc.git] / gcc-4_8-branch / gcc / testsuite / g++.dg / tree-ssa / pr29902.C
blob838a41169ad1b537782954bd13a132973f029daa
1 /* { dg-do compile { target i?86-*-* } } */
2 /* { dg-options "-O1 -fprefetch-loop-arrays -march=athlon" } */
3 /* { dg-require-effective-target ilp32 } */
5 int length1();
6 int g(int);
7 void f(int capacity_, char *old_storage)
9   try {
10       length1();
11       int old_capacity = capacity_;
12       capacity_ *= 2;
13       g(capacity_);
14       for (int i = 1; i < old_capacity; i++)
15         old_storage[i] = old_storage[i - 1];
16   } catch (...) {
17       for (int i = 1; i < capacity_; i++){old_storage[i] = 0;}
18   }