gcc/testsuite/g++.dg/torture/pr67600.C
raw| 1 | // { dg-do run } |
| 2 | // { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } } |
| 3 | |
| 4 | #include <iostream> |
| 5 | #include <sstream> |
| 6 | |
| 7 | int main() |
| 8 | { |
| 9 | std::basic_ostringstream<char> ostr; |
| 10 | std::ostreambuf_iterator<char> iter(ostr.rdbuf()); |
| 11 | *iter++ = 'X'; |
| 12 | |
| 13 | |
| 14 | std::cout << ostr.str() << '\n'; |
| 15 | return 0; |
| 16 | } |