[gcc/devel/omp/gcc-9] PR libstdc++/91067 fix missing exports for filesystem iterators

Tobias Burnus burnus@gcc.gnu.org
Thu Mar 5 14:06:00 GMT 2020


https://gcc.gnu.org/g:7eaccf3e29a2d2571f9f6fdf884e4732b8fd3baa

commit 7eaccf3e29a2d2571f9f6fdf884e4732b8fd3baa
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Wed Jul 3 22:09:13 2019 +0100

    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: r273025

Diff:
---
 libstdc++-v3/ChangeLog                             |  8 ++++
 libstdc++-v3/acinclude.m4                          |  2 +-
 libstdc++-v3/config/abi/pre/gnu.ver                | 16 ++++++++
 libstdc++-v3/configure                             |  2 +-
 .../testsuite/27_io/filesystem/iterators/91067.cc  | 45 ++++++++++++++++++++++
 libstdc++-v3/testsuite/util/testsuite_abi.cc       |  3 +-
 6 files changed, 73 insertions(+), 3 deletions(-)

diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 147ac95..c75886d 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,5 +1,13 @@
 2019-07-03  Jonathan Wakely  <jwakely@redhat.com>
 
+	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.
+
 	Backport from mainline
 	2019-07-02  Jonathan Wakely  <jwakely@redhat.com>
 
diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
index 84258d8..0112d64 100644
--- a/libstdc++-v3/acinclude.m4
+++ b/libstdc++-v3/acinclude.m4
@@ -3820,7 +3820,7 @@ changequote([,])dnl
 fi
 
 # For libtool versioning info, format is CURRENT:REVISION:AGE
-libtool_VERSION=6:26:0
+libtool_VERSION=6:27:0
 
 # Everything parsed; figure out what files and settings to use.
 case $enable_symvers in
diff --git a/libstdc++-v3/config/abi/pre/gnu.ver b/libstdc++-v3/config/abi/pre/gnu.ver
index 58d3e90..ff4b74c 100644
--- a/libstdc++-v3/config/abi/pre/gnu.ver
+++ b/libstdc++-v3/config/abi/pre/gnu.ver
@@ -2266,6 +2266,22 @@ GLIBCXX_3.4.26 {
 
 } GLIBCXX_3.4.25;
 
+GLIBCXX_3.4.27 {
+
+    # __shared_ptr<_Dir>::__shared_ptr()
+    _ZNSt12__shared_ptrINSt10filesystem4_DirELN9__gnu_cxx12_Lock_policyE[012]EEC2Ev;
+    _ZNSt12__shared_ptrINSt10filesystem7__cxx114_DirELN9__gnu_cxx12_Lock_policyE[012]EEC2Ev;
+
+    # __shared_ptr<recursive_directory_iterator::_Dir_stack>::__shared_ptr()
+    _ZNSt12__shared_ptrINSt10filesystem28recursive_directory_iterator10_Dir_stackELN9__gnu_cxx12_Lock_policyE[012]EEC2Ev;
+    _ZNSt12__shared_ptrINSt10filesystem7__cxx1128recursive_directory_iterator10_Dir_stackELN9__gnu_cxx12_Lock_policyE[012]EEC2Ev;
+
+    # recursive_directory_iterator::operator=(const recursive_directory_iterator&)
+    _ZNSt10filesystem28recursive_directory_iteratoraSERKS0_;
+    _ZNSt10filesystem7__cxx1128recursive_directory_iteratoraSERKS1_;
+
+} GLIBCXX_3.4.26;
+
 # Symbols in the support library (libsupc++) have their own tag.
 CXXABI_1.3 {
 
diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
index 7d134a0..5acf79c 100755
--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
@@ -79469,7 +79469,7 @@ $as_echo "$as_me: WARNING: === Symbol versioning will be disabled." >&2;}
 fi
 
 # For libtool versioning info, format is CURRENT:REVISION:AGE
-libtool_VERSION=6:26:0
+libtool_VERSION=6:27:0
 
 # Everything parsed; figure out what files and settings to use.
 case $enable_symvers in
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 0000000..54172d9
--- /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();
+}
diff --git a/libstdc++-v3/testsuite/util/testsuite_abi.cc b/libstdc++-v3/testsuite/util/testsuite_abi.cc
index a2d2cab..1277972 100644
--- a/libstdc++-v3/testsuite/util/testsuite_abi.cc
+++ b/libstdc++-v3/testsuite/util/testsuite_abi.cc
@@ -207,6 +207,7 @@ check_version(symbol& test, bool added)
       known_versions.push_back("GLIBCXX_3.4.24");
       known_versions.push_back("GLIBCXX_3.4.25");
       known_versions.push_back("GLIBCXX_3.4.26");
+      known_versions.push_back("GLIBCXX_3.4.27");
       known_versions.push_back("CXXABI_1.3");
       known_versions.push_back("CXXABI_LDBL_1.3");
       known_versions.push_back("CXXABI_1.3.1");
@@ -238,7 +239,7 @@ check_version(symbol& test, bool added)
 	test.version_status = symbol::incompatible;
 
       // Check that added symbols are added in the latest pre-release version.
-      bool latestp = (test.version_name == "GLIBCXX_3.4.26"
+      bool latestp = (test.version_name == "GLIBCXX_3.4.27"
 		     || test.version_name == "CXXABI_1.3.12"
 		     || test.version_name == "CXXABI_FLOAT128"
 		     || test.version_name == "CXXABI_TM_1");



More information about the Libstdc++-cvs mailing list