gcc/testsuite/g++.dg/warn/Wdangling-pointer-pr110055.C
raw| 1 | // { dg-do compile } |
| 2 | // { dg-require-effective-target c++11 } |
| 3 | // { dg-options "-O3 -fno-exceptions -Wdangling-pointer" } |
| 4 | // { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } } |
| 5 | |
| 6 | #include <cstdint> |
| 7 | #include <vector> |
| 8 | |
| 9 | struct Data { |
| 10 | std::vector<uint16_t> v = {1, 1}; |
| 11 | }; |
| 12 | |
| 13 | int main() |
| 14 | { |
| 15 | Data a; |
| 16 | Data b; |
| 17 | } |