aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/testsuite/27_io/rvalue_streams-2.cc
diff options
context:
space:
mode:
authorMichael Meissner <meissner@linux.vnet.ibm.com>2015-04-10 18:39:05 +0000
committerMichael Meissner <meissner@linux.vnet.ibm.com>2015-04-10 18:39:05 +0000
commitbc57afcfbb08ff10cc6fd036d580c71bfaf00ed8 (patch)
tree10f38072ae840828e4205e4f549020643cfeb678 /libstdc++-v3/testsuite/27_io/rvalue_streams-2.cc
parent48796cb6a9ff1feb2f870a4d6bd1d49112265c12 (diff)
parent24aaa4722c67688820b40f62483a6243e552d447 (diff)
Merge up to 221977ibm/fusion3
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/ibm/fusion3@221980 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/testsuite/27_io/rvalue_streams-2.cc')
-rw-r--r--libstdc++-v3/testsuite/27_io/rvalue_streams-2.cc35
1 files changed, 35 insertions, 0 deletions
diff --git a/libstdc++-v3/testsuite/27_io/rvalue_streams-2.cc b/libstdc++-v3/testsuite/27_io/rvalue_streams-2.cc
new file mode 100644
index 00000000000..d9b61464b58
--- /dev/null
+++ b/libstdc++-v3/testsuite/27_io/rvalue_streams-2.cc
@@ -0,0 +1,35 @@
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
+
+// Copyright (C) 2015 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <sstream>
+
+struct A {};
+
+void operator<<(std::ostream&, const A&) { }
+void operator>>(std::istream&, A&) { }
+
+// PR libstdc++/65543
+int main()
+{
+ A a;
+
+ std::ostringstream() << a;
+ std::istringstream() >> a;
+}