summaryrefslogtreecommitdiff
path: root/libstdc++-v3/testsuite/27_io/filesystem
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2019-07-03 22:06:25 +0100
committerJonathan Wakely <redi@gcc.gnu.org>2019-07-03 22:06:25 +0100
commit67699bf667313820add5a0ba24dd3baa0734eb4c (patch)
tree8f844157cfcf383abeae3fb77906faeda451b145 /libstdc++-v3/testsuite/27_io/filesystem
parent1bbffb87a9ecc3e27a4074145e55e3315df57b7d (diff)
PR libstdc++/91067 fix missing exports for filesystem iterators
The copy assignment operator for recursive_directory_iterator was not exported despite being needed. The __shared_ptr default constructors are not needed when compiling with GCC but Clang requires them for -O1. PR libstdc++/91067 * acinclude.m4 (libtool_VERSION): Bump to 6:27:0. * configure: Regenerate. * config/abi/pre/gnu.ver (GLIBCXX_3.4.27): Add new version. Export missing symbols. * testsuite/27_io/filesystem/iterators/91067.cc: New test. * testsuite/util/testsuite_abi.cc: Add new symbol version. From-SVN: r273023
Diffstat (limited to 'libstdc++-v3/testsuite/27_io/filesystem')
-rw-r--r--libstdc++-v3/testsuite/27_io/filesystem/iterators/91067.cc45
1 files changed, 45 insertions, 0 deletions
diff --git a/libstdc++-v3/testsuite/27_io/filesystem/iterators/91067.cc b/libstdc++-v3/testsuite/27_io/filesystem/iterators/91067.cc
new file mode 100644
index 00000000000..54172d9f20b
--- /dev/null
+++ b/libstdc++-v3/testsuite/27_io/filesystem/iterators/91067.cc
@@ -0,0 +1,45 @@
+// Copyright (C) 2019 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/>.
+
+// { dg-options "-std=gnu++17" }
+// { dg-do link { target c++17 } }
+// { dg-require-filesystem-ts "" }
+
+#include <filesystem>
+
+void
+test01()
+{
+ std::filesystem::directory_iterator d;
+ d = d;
+ d = std::move(d);
+}
+
+void
+test02()
+{
+ std::filesystem::recursive_directory_iterator d;
+ d = d;
+ d = std::move(d);
+}
+
+int
+main()
+{
+ test01();
+ test02();
+}