gcc/testsuite/g++.dg/torture/pr46111.C
raw| 1 | // { dg-do compile } |
| 2 | // { dg-require-effective-target pthread } |
| 3 | // { dg-options "-ftree-parallelize-loops=2 -g" } |
| 4 | |
| 5 | struct A |
| 6 | { |
| 7 | int zero () |
| 8 | { |
| 9 | return 0; |
| 10 | } |
| 11 | }; |
| 12 | |
| 13 | static inline void |
| 14 | bar (int) |
| 15 | { |
| 16 | } |
| 17 | |
| 18 | struct B |
| 19 | { |
| 20 | struct A a; |
| 21 | B (int n) |
| 22 | { |
| 23 | for (int i = 0; i < n; i++) |
| 24 | bar (a.zero ()); |
| 25 | } |
| 26 | }; |
| 27 | |
| 28 | void |
| 29 | foo (int n) |
| 30 | { |
| 31 | struct B b (n); |
| 32 | } |