diff mbox

RFC: C++ PATCH to adjust empty class parameter passing ABI

Message ID 20160413220045.GB16090@redhat.com
State New
Headers show

Commit Message

Jonathan Wakely April 13, 2016, 10 p.m. UTC
On 12/04/16 16:27 -0400, Jason Merrill wrote:
>A revision of the patch previously posted at
>
>  https://gcc.gnu.org/ml/gcc-patches/2016-03/msg00841.html
>
>To recap quickly, the C++ compiler has used a different calling 
>convention for passing empty classes, because C++ says they have size 
>1, while the GCC C extension gives them size 0.  But this difference 
>doesn't mean that they need to be passed differently; in either case 
>there's no actual data involved.  And the Clang folks recently pointed 
>out that if you squint properly, it seems that the x86_64 psABI says 
>that an empty class shouldn't be passed either in registers or memory. 
>H.J. had a back-end fix, but it seemed to me that a front-end fix 
>would be simpler and safer.
>
>The first patch corrects errors in what the C++ front end considers an 
>empty classes; unnamed bit-fields aren't really members.  I'm checking 
>this in now.
>
>The second patch is the actual ABI change under -fabi-version=10, 
>including a warning.  Jonathan, please check this in with your library 
>changes.

I've committed the library changes as the attached patch.
diff mbox

Patch

commit dd715d3cb76a536aa4496e9efdf3f932aeb605ff
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Wed Apr 13 20:47:23 2016 +0100

    Adjust for new empty class parameter passing ABI.
    
    	* include/bits/c++config (_GLIBCXX_BEGIN_NAMESPACE_EMPTY_TYPES,
    	_GLIBCXX_END_NAMESPACE_EMPTY_TYPES, _GLIBCXX_ABI_TAG_EMPTY): Define.
    	* include/bits/hashtable.h (_Hashtable::_M_emplace): Change signatures
    	of functions taking empty structs by value. Add a template parameter
    	to overloads without hints. Rename overloads with hints to
    	_M_emplace_hint.
    	(_Hashtable::_M_erase(true_type, const_iterator),
    	_Hashtable::_M_erase(false_type, const_iterator)): Change signatures
    	by reordering parameters.
    	* include/bits/hashtable_policy.h (_Insert::insert): Adjust to call
    	_M_emplace_hint instead of _M_emplace.
    	* include/bits/shared_ptr.h (shared_ptr(_Tp1*, _Deleter, _Alloc),
    	shared_ptr(nullptr_t, _Deleter, _Alloc)): Use _GLIBCXX_ABI_TAG_EMPTY.
    	* include/bits/shared_ptr_base.h (_Sp_counted_deleter, __shared_count,
    	__shared_ptr): Likewise.
    	* include/bits/stl_algo.h (replace_if): Likewise.
    	* include/bits/stl_pair.h (piecewise_construct_t,
    	piecewise_construct): Use _GLIBCXX_BEGIN_NAMESPACE_EMPTY_TYPES.
    	* include/bits/uses_allocator.h (allocator_arg_t, allocator_arg,
    	__uses_alloc0): Likewise.
    	* include/ext/pb_ds/assoc_container.hpp (basic_hash_table): Likewise.
    	* testsuite/20_util/scoped_allocator/69293_neg.cc: Adjust dg-error.
    	* testsuite/20_util/shared_ptr/cons/43820_neg.cc: Likewise.
    	* testsuite/20_util/shared_ptr/cons/void_neg.cc: Likewise.
    	* testsuite/20_util/uses_allocator/69293_neg.cc: Likewise.
    	* testsuite/20_util/uses_allocator/cons_neg.cc: Likewise.
    	* testsuite/ext/profile/mutex_extensions_neg.cc: Likewise.

diff --git a/libstdc++-v3/include/bits/c++config b/libstdc++-v3/include/bits/c++config
index 57024e4..bde003c 100644
--- a/libstdc++-v3/include/bits/c++config
+++ b/libstdc++-v3/include/bits/c++config
@@ -84,13 +84,32 @@ 
 # define _GLIBCXX_DEPRECATED
 #endif
 
+#if __cplusplus
+
 // Macros for ABI tag attributes.
 #ifndef _GLIBCXX_ABI_TAG_CXX11
 # define _GLIBCXX_ABI_TAG_CXX11 __attribute ((__abi_tag__ ("cxx11")))
 #endif
 
-
-#if __cplusplus
+#if __GXX_ABI_VERSION >= 1010
+namespace std
+{
+  inline namespace _V2 { }
+}
+# define _GLIBCXX_BEGIN_NAMESPACE_EMPTY_TYPES \
+  _GLIBCXX_END_NAMESPACE_VERSION \
+  namespace _V2 { \
+  _GLIBCXX_BEGIN_NAMESPACE_VERSION
+# define _GLIBCXX_END_NAMESPACE_EMPTY_TYPES \
+  _GLIBCXX_END_NAMESPACE_VERSION \
+  } \
+  _GLIBCXX_BEGIN_NAMESPACE_VERSION
+# define _GLIBCXX_ABI_TAG_EMPTY __attribute ((__abi_tag__ ("cxxempty")))
+#else
+# define _GLIBCXX_BEGIN_NAMESPACE_EMPTY_TYPES
+# define _GLIBCXX_END_NAMESPACE_EMPTY_TYPES
+# define _GLIBCXX_ABI_TAG_EMPTY
+#endif
 
 // Macro for constexpr, to support in mixed 03/0x mode.
 #ifndef _GLIBCXX_CONSTEXPR
diff --git a/libstdc++-v3/include/bits/hashtable.h b/libstdc++-v3/include/bits/hashtable.h
index 5748920..22b7187 100644
--- a/libstdc++-v3/include/bits/hashtable.h
+++ b/libstdc++-v3/include/bits/hashtable.h
@@ -663,24 +663,26 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
       _M_insert_multi_node(__node_type* __hint,
 			   __hash_code __code, __node_type* __n);
 
-      template<typename... _Args>
-	std::pair<iterator, bool>
-	_M_emplace(std::true_type, _Args&&... __args);
+      template<bool _Uniq, typename... _Args>
+	typename enable_if<_Uniq, std::pair<iterator, bool>>::type
+	_M_emplace(__bool_constant<_Uniq>, _Args&&... __args);
 
-      template<typename... _Args>
-	iterator
-	_M_emplace(std::false_type __uk, _Args&&... __args)
-	{ return _M_emplace(cend(), __uk, std::forward<_Args>(__args)...); }
+      template<bool _Uniq, typename... _Args>
+	typename enable_if<!_Uniq, iterator>::type
+	_M_emplace(__bool_constant<_Uniq> __uk, _Args&&... __args)
+	{
+	  return _M_emplace_hint(cend(), __uk, std::forward<_Args>(__args)...);
+	}
 
       // Emplace with hint, useless when keys are unique.
       template<typename... _Args>
 	iterator
-	_M_emplace(const_iterator, std::true_type __uk, _Args&&... __args)
+	_M_emplace_hint(const_iterator, std::true_type __uk, _Args&&... __args)
 	{ return _M_emplace(__uk, std::forward<_Args>(__args)...).first; }
 
       template<typename... _Args>
 	iterator
-	_M_emplace(const_iterator, std::false_type, _Args&&... __args);
+	_M_emplace_hint(const_iterator, std::false_type, _Args&&... __args);
 
       template<typename _Arg, typename _NodeGenerator>
 	std::pair<iterator, bool>
@@ -712,10 +714,10 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
 		  const _NodeGenerator&, std::false_type);
 
       size_type
-      _M_erase(std::true_type, const key_type&);
+      _M_erase(const key_type&, std::true_type);
 
       size_type
-      _M_erase(std::false_type, const key_type&);
+      _M_erase(const key_type&, std::false_type);
 
       iterator
       _M_erase(size_type __bkt, __node_base* __prev_n, __node_type* __n);
@@ -731,8 +733,8 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
 	iterator
 	emplace_hint(const_iterator __hint, _Args&&... __args)
 	{
-	  return _M_emplace(__hint, __unique_keys(),
-			    std::forward<_Args>(__args)...);
+	  return _M_emplace_hint(__hint, __unique_keys(),
+				 std::forward<_Args>(__args)...);
 	}
 
       // Insert member functions via inheritance.
@@ -748,7 +750,7 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
       size_type
       erase(const key_type& __k)
-      { return _M_erase(__unique_keys(), __k); }
+      { return _M_erase(__k, __unique_keys()); }
 
       iterator
       erase(const_iterator, const_iterator);
@@ -1502,12 +1504,12 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
 	   typename _Alloc, typename _ExtractKey, typename _Equal,
 	   typename _H1, typename _H2, typename _Hash, typename _RehashPolicy,
 	   typename _Traits>
-    template<typename... _Args>
+    template<bool _Uniq, typename... _Args>
       auto
       _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal,
 		 _H1, _H2, _Hash, _RehashPolicy, _Traits>::
-      _M_emplace(std::true_type, _Args&&... __args)
-      -> pair<iterator, bool>
+      _M_emplace(__bool_constant<_Uniq>, _Args&&... __args)
+      -> typename enable_if<_Uniq, pair<iterator, bool>>::type
       {
 	// First build the node to get access to the hash code
 	__node_type* __node = this->_M_allocate_node(std::forward<_Args>(__args)...);
@@ -1544,7 +1546,7 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
       auto
       _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal,
 		 _H1, _H2, _Hash, _RehashPolicy, _Traits>::
-      _M_emplace(const_iterator __hint, std::false_type, _Args&&... __args)
+      _M_emplace_hint(const_iterator __hint, std::false_type, _Args&&... __args)
       -> iterator
       {
 	// First build the node to get its hash code.
@@ -1769,7 +1771,7 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
     auto
     _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal,
 	       _H1, _H2, _Hash, _RehashPolicy, _Traits>::
-    _M_erase(std::true_type, const key_type& __k)
+    _M_erase(const key_type& __k, std::true_type)
     -> size_type
     {
       __hash_code __code = this->_M_hash_code(__k);
@@ -1793,7 +1795,7 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
     auto
     _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal,
 	       _H1, _H2, _Hash, _RehashPolicy, _Traits>::
-    _M_erase(std::false_type, const key_type& __k)
+    _M_erase(const key_type& __k, std::false_type)
     -> size_type
     {
       __hash_code __code = this->_M_hash_code(__k);
diff --git a/libstdc++-v3/include/bits/hashtable_policy.h b/libstdc++-v3/include/bits/hashtable_policy.h
index 7a2ac92..ceb78b4 100644
--- a/libstdc++-v3/include/bits/hashtable_policy.h
+++ b/libstdc++-v3/include/bits/hashtable_policy.h
@@ -906,8 +906,8 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
 	insert(const_iterator __hint, _Pair&& __v)
 	{
 	  __hashtable& __h = this->_M_conjure_hashtable();
-	  return __h._M_emplace(__hint, __unique_keys(),
-				std::forward<_Pair>(__v));
+	  return __h._M_emplace_hint(__hint, __unique_keys(),
+				     std::forward<_Pair>(__v));
 	}
    };
 
diff --git a/libstdc++-v3/include/bits/shared_ptr.h b/libstdc++-v3/include/bits/shared_ptr.h
index b22477e..f4c2754 100644
--- a/libstdc++-v3/include/bits/shared_ptr.h
+++ b/libstdc++-v3/include/bits/shared_ptr.h
@@ -166,6 +166,7 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
        *  __shared_ptr will release __p by calling __d(__p)
        */
       template<typename _Tp1, typename _Deleter, typename _Alloc>
+	_GLIBCXX_ABI_TAG_EMPTY
 	shared_ptr(_Tp1* __p, _Deleter __d, _Alloc __a)
 	: __shared_ptr<_Tp>(__p, __d, std::move(__a)) { }
 
@@ -185,6 +186,7 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
        *  The last owner will call __d(__p)
        */
       template<typename _Deleter, typename _Alloc>
+	_GLIBCXX_ABI_TAG_EMPTY
 	shared_ptr(nullptr_t __p, _Deleter __d, _Alloc __a)
 	: __shared_ptr<_Tp>(__p, __d, std::move(__a)) { }
 
diff --git a/libstdc++-v3/include/bits/shared_ptr_base.h b/libstdc++-v3/include/bits/shared_ptr_base.h
index e844c9c..6d523e1 100644
--- a/libstdc++-v3/include/bits/shared_ptr_base.h
+++ b/libstdc++-v3/include/bits/shared_ptr_base.h
@@ -436,6 +436,7 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
 	typedef _Sp_ebo_helper<1, _Alloc>	_Alloc_base;
 
       public:
+	_GLIBCXX_ABI_TAG_EMPTY
 	_Impl(_Ptr __p, _Deleter __d, const _Alloc& __a) noexcept
 	: _M_ptr(__p), _Del_base(__d), _Alloc_base(__a)
 	{ }
@@ -454,6 +455,7 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
       : _M_impl(__p, __d, _Alloc()) { }
 
       // __d(__p) must not throw.
+      _GLIBCXX_ABI_TAG_EMPTY
       _Sp_counted_deleter(_Ptr __p, _Deleter __d, const _Alloc& __a) noexcept
       : _M_impl(__p, __d, __a) { }
 
@@ -584,6 +586,7 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
 	{ }
 
       template<typename _Ptr, typename _Deleter, typename _Alloc>
+	_GLIBCXX_ABI_TAG_EMPTY
 	__shared_count(_Ptr __p, _Deleter __d, _Alloc __a) : _M_pi(0)
 	{
 	  typedef _Sp_counted_deleter<_Ptr, _Deleter, _Alloc, _Lp> _Sp_cd_type;
@@ -900,6 +903,7 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
 	}
 
       template<typename _Tp1, typename _Deleter, typename _Alloc>
+	_GLIBCXX_ABI_TAG_EMPTY
 	__shared_ptr(_Tp1* __p, _Deleter __d, _Alloc __a)
 	: _M_ptr(__p), _M_refcount(__p, __d, std::move(__a))
 	{
@@ -914,6 +918,7 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
 	{ }
 
       template<typename _Deleter, typename _Alloc>
+	_GLIBCXX_ABI_TAG_EMPTY
         __shared_ptr(nullptr_t __p, _Deleter __d, _Alloc __a)
 	: _M_ptr(0), _M_refcount(__p, __d, std::move(__a))
 	{ }
@@ -1039,6 +1044,7 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
 	{ __shared_ptr(__p, __d).swap(*this); }
 
       template<typename _Tp1, typename _Deleter, typename _Alloc>
+	_GLIBCXX_ABI_TAG_EMPTY
 	void
         reset(_Tp1* __p, _Deleter __d, _Alloc __a)
         { __shared_ptr(__p, __d, std::move(__a)).swap(*this); }
diff --git a/libstdc++-v3/include/bits/stl_algo.h b/libstdc++-v3/include/bits/stl_algo.h
index fbd03a7..28e1e3b 100644
--- a/libstdc++-v3/include/bits/stl_algo.h
+++ b/libstdc++-v3/include/bits/stl_algo.h
@@ -4270,6 +4270,7 @@  _GLIBCXX_BEGIN_NAMESPACE_ALGO
    *  is true then the assignment @c *i = @p __new_value is performed.
   */
   template<typename _ForwardIterator, typename _Predicate, typename _Tp>
+    _GLIBCXX_ABI_TAG_EMPTY
     void
     replace_if(_ForwardIterator __first, _ForwardIterator __last,
 	       _Predicate __pred, const _Tp& __new_value)
diff --git a/libstdc++-v3/include/bits/stl_pair.h b/libstdc++-v3/include/bits/stl_pair.h
index 37ee5cc..e6ff00e 100644
--- a/libstdc++-v3/include/bits/stl_pair.h
+++ b/libstdc++-v3/include/bits/stl_pair.h
@@ -72,12 +72,17 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
    */
 
 #if __cplusplus >= 201103L
+
+_GLIBCXX_BEGIN_NAMESPACE_EMPTY_TYPES
+
   /// piecewise_construct_t
   struct piecewise_construct_t { explicit piecewise_construct_t() = default; };
 
   /// piecewise_construct
   constexpr piecewise_construct_t piecewise_construct = piecewise_construct_t();
 
+_GLIBCXX_END_NAMESPACE_EMPTY_TYPES
+
   // Forward declarations.
   template<typename...>
     class tuple;
diff --git a/libstdc++-v3/include/bits/uses_allocator.h b/libstdc++-v3/include/bits/uses_allocator.h
index b1ff58a..86162a8 100644
--- a/libstdc++-v3/include/bits/uses_allocator.h
+++ b/libstdc++-v3/include/bits/uses_allocator.h
@@ -42,11 +42,15 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
     using __is_erased_or_convertible
       = __or_<is_same<_Tp, __erased_type>, is_convertible<_Alloc, _Tp>>;
 
+_GLIBCXX_BEGIN_NAMESPACE_EMPTY_TYPES
+
   /// [allocator.tag]
   struct allocator_arg_t { explicit allocator_arg_t() = default; };
 
   constexpr allocator_arg_t allocator_arg = allocator_arg_t();
 
+_GLIBCXX_END_NAMESPACE_EMPTY_TYPES
+
   template<typename _Tp, typename _Alloc, typename = __void_t<>>
     struct __uses_allocator_helper
     : false_type { };
@@ -65,11 +69,15 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
   struct __uses_alloc_base { };
 
+_GLIBCXX_BEGIN_NAMESPACE_EMPTY_TYPES
+
   struct __uses_alloc0 : __uses_alloc_base
   {
     struct _Sink { void operator=(const void*) { } } _M_a;
   };
 
+_GLIBCXX_END_NAMESPACE_EMPTY_TYPES
+
   template<typename _Alloc>
     struct __uses_alloc1 : __uses_alloc_base { const _Alloc* _M_a; };
 
diff --git a/libstdc++-v3/include/ext/pb_ds/assoc_container.hpp b/libstdc++-v3/include/ext/pb_ds/assoc_container.hpp
index 571d946..a6b1e27 100644
--- a/libstdc++-v3/include/ext/pb_ds/assoc_container.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/assoc_container.hpp
@@ -120,36 +120,44 @@  namespace __gnu_pbds
       basic_hash_table(T0 t0) : base_type(t0) { }
 
     template<typename T0, typename T1>
+      _GLIBCXX_ABI_TAG_EMPTY
       basic_hash_table(T0 t0, T1 t1) : base_type(t0, t1) { }
 
     template<typename T0, typename T1, typename T2>
+      _GLIBCXX_ABI_TAG_EMPTY
       basic_hash_table(T0 t0, T1 t1, T2 t2) : base_type(t0, t1, t2) { }
 
     template<typename T0, typename T1, typename T2, typename T3>
+      _GLIBCXX_ABI_TAG_EMPTY
       basic_hash_table(T0 t0, T1 t1, T2 t2, T3 t3)
       : base_type(t0, t1, t2, t3) { }
 
     template<typename T0, typename T1, typename T2, typename T3, typename T4>
+      _GLIBCXX_ABI_TAG_EMPTY
       basic_hash_table(T0 t0, T1 t1, T2 t2, T3 t3, T4 t4)
       : base_type(t0, t1, t2, t3, t4) { }
 
     template<typename T0, typename T1, typename T2, typename T3, typename T4,
 	     typename T5>
+      _GLIBCXX_ABI_TAG_EMPTY
       basic_hash_table(T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5)
       : base_type(t0, t1, t2, t3, t4, t5) { }
 
     template<typename T0, typename T1, typename T2, typename T3, typename T4,
 	     typename T5, typename T6>
+      _GLIBCXX_ABI_TAG_EMPTY
       basic_hash_table(T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6)
       : base_type(t0, t1, t2, t3, t4, t5, t6) { }
 
     template<typename T0, typename T1, typename T2, typename T3, typename T4,
 	     typename T5, typename T6, typename T7>
+      _GLIBCXX_ABI_TAG_EMPTY
       basic_hash_table(T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7)
       : base_type(t0, t1, t2, t3, t4, t5, t6, t7) { }
 
     template<typename T0, typename T1, typename T2, typename T3, typename T4,
 	     typename T5, typename T6, typename T7, typename T8>
+      _GLIBCXX_ABI_TAG_EMPTY
       basic_hash_table(T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6,
 		       T7 t7, T8 t8)
       : base_type(t0, t1, t2, t3, t4, t5, t6, t7, t8)
diff --git a/libstdc++-v3/testsuite/20_util/scoped_allocator/69293_neg.cc b/libstdc++-v3/testsuite/20_util/scoped_allocator/69293_neg.cc
index f3b2d87..5487b0a 100644
--- a/libstdc++-v3/testsuite/20_util/scoped_allocator/69293_neg.cc
+++ b/libstdc++-v3/testsuite/20_util/scoped_allocator/69293_neg.cc
@@ -47,5 +47,5 @@  test01()
   scoped_alloc sa;
   auto p = sa.allocate(1);
   sa.construct(p);  // this is required to be ill-formed
-  // { dg-error "static assertion failed" "" { target *-*-* } 89 }
+  // { dg-error "static assertion failed" "" { target *-*-* } 97 }
 }
diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/cons/43820_neg.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/43820_neg.cc
index 395094f..a0ce1f5 100644
--- a/libstdc++-v3/testsuite/20_util/shared_ptr/cons/43820_neg.cc
+++ b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/43820_neg.cc
@@ -32,7 +32,7 @@  void test01()
 {
   X* px = 0;
   std::shared_ptr<X> p1(px);   // { dg-error "here" }
-  // { dg-error "incomplete" "" { target *-*-* } 889 }
+  // { dg-error "incomplete" "" { target *-*-* } 892 }
 
   std::shared_ptr<X> p9(ap());  // { dg-error "here" }
   // { dg-error "incomplete" "" { target *-*-* } 307 }
diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/cons/void_neg.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/void_neg.cc
index 8843ffe..88036fd 100644
--- a/libstdc++-v3/testsuite/20_util/shared_ptr/cons/void_neg.cc
+++ b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/void_neg.cc
@@ -25,5 +25,5 @@ 
 void test01()
 {
   std::shared_ptr<void> p((void*)nullptr);   // { dg-error "here" }
-  // { dg-error "incomplete" "" { target *-*-* } 888 }
+  // { dg-error "incomplete" "" { target *-*-* } 891 }
 }
diff --git a/libstdc++-v3/testsuite/20_util/uses_allocator/69293_neg.cc b/libstdc++-v3/testsuite/20_util/uses_allocator/69293_neg.cc
index 19417fc..88e1ea1 100644
--- a/libstdc++-v3/testsuite/20_util/uses_allocator/69293_neg.cc
+++ b/libstdc++-v3/testsuite/20_util/uses_allocator/69293_neg.cc
@@ -45,5 +45,5 @@  test01()
 {
   alloc_type a;
   std::tuple<X> t(std::allocator_arg, a); // this is required to be ill-formed
-  // { dg-error "static assertion failed" "" { target *-*-* } 89 }
+  // { dg-error "static assertion failed" "" { target *-*-* } 97 }
 }
diff --git a/libstdc++-v3/testsuite/20_util/uses_allocator/cons_neg.cc b/libstdc++-v3/testsuite/20_util/uses_allocator/cons_neg.cc
index b3df4ae..e4cd276 100644
--- a/libstdc++-v3/testsuite/20_util/uses_allocator/cons_neg.cc
+++ b/libstdc++-v3/testsuite/20_util/uses_allocator/cons_neg.cc
@@ -44,4 +44,4 @@  void test01()
 
   tuple<Type> t(allocator_arg, a, 1);
 }
-// { dg-error "static assertion failed" "" { target *-*-* } 89 }
+// { dg-error "static assertion failed" "" { target *-*-* } 97 }
diff --git a/libstdc++-v3/testsuite/ext/profile/mutex_extensions_neg.cc b/libstdc++-v3/testsuite/ext/profile/mutex_extensions_neg.cc
index e59d666..8ffdee8 100644
--- a/libstdc++-v3/testsuite/ext/profile/mutex_extensions_neg.cc
+++ b/libstdc++-v3/testsuite/ext/profile/mutex_extensions_neg.cc
@@ -25,7 +25,7 @@ 
 
 #include <vector>
 
-// { dg-error "multiple inlined namespaces" "" { target *-*-* } 324 }
+// { dg-error "multiple inlined namespaces" "" { target *-*-* } 343 }
 
 // "template argument 1 is invalid"
 // { dg-prune-output "tuple:993" }