OSDN Git Service

Add missing test from last commit
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / tree-ssa / pr29902.C
1 /* { dg-do compile { target i?86-*-* } } */
2 /* { dg-options "-O1 -fprefetch-loop-arrays -march=athlon" } */
3 /* { dg-require-effective-target ilp32 } */
4
5 int length1();
6 int g(int);
7 void f(int capacity_, char *old_storage)
8 {
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   }
19 }