gcc/testsuite/g++.dg/graphite/pr42130.C
raw| 1 | /* { dg-options "-O2 -fgraphite-identity -fno-tree-ch" } */ |
| 2 | /* { dg-do run } */ |
| 3 | // { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } } |
| 4 | |
| 5 | #include <vector> |
| 6 | |
| 7 | using std::vector; |
| 8 | |
| 9 | vector<unsigned> & __attribute__((noinline, noclone)) foo(unsigned n) |
| 10 | { |
| 11 | vector<unsigned> *vv = new vector<unsigned>(n, 0u); |
| 12 | return *vv; |
| 13 | } |
| 14 | |
| 15 | int main() |
| 16 | { |
| 17 | foo(0); |
| 18 | return 0; |
| 19 | } |
| 20 |