libstdc++-v3/testsuite/24_iterators/istreambuf_iterator/105580.cc
raw| 1 | // { dg-compile } |
| 2 | // { dg-additional-options "-Wnull-dereference" } |
| 3 | // { dg-add-options no_pch } |
| 4 | |
| 5 | #include <string> |
| 6 | #include <sstream> |
| 7 | |
| 8 | int main() |
| 9 | { |
| 10 | std::istringstream in("Hello, world"); |
| 11 | std::istreambuf_iterator<char> it(in), end; |
| 12 | std::string ss(it, end); |
| 13 | return 0; |
| 14 | } |
| 15 | |
| 16 | // { dg-bogus "null pointer dereference" "" { target *-*-* } 0 } |