Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / g++.dg / eh / loop1.C
blobb9b230e0fe1b40c186a7a651b43068b22db63ef9
1 // Verify that loop optimization takes into account the exception edge
2 // and does not increment I before the call.
3 // { dg-do run }
4 // { dg-options "-O2" }
6 extern "C" void abort();
7 static void bar(char *);
9 static void foo(unsigned long element_count, char *ptr)
11   unsigned long i;
12   try {
13     for (i = 0; i != element_count; i++, ptr += 8)
14       bar (ptr);
15   }
16   catch (...) {
17     if (i)
18       abort ();
19   }
22 static void bar(char *)
24   throw 1;
27 int main()
29   foo(2, 0);