Fix all tests that fail with -sanitize=return.
[official-gcc.git] / gcc / testsuite / g++.dg / tree-ssa / pr38632.C
blob04fca2280217b3e6645ca37997cecb6fe58b4358
1 // { dg-do compile }
2 // { dg-require-effective-target pthread } 
3 // { dg-options "-O -ftree-parallelize-loops=2" }
5 void foo();
7 void bar(int n, char *p)
9   try
10   {
11     foo();
12     ++n;
13     foo();
14     for (int i = 0; i < n-1; ++i)
15       p[i] = 0;
16   }
17   catch (...)
18   {
19     for (int i = 0; i < n; ++i)
20       p[i] = 0;
21   }