pr57878.C (__sso_string_base::_M_get_allocator): Return a value.
authorJakub Jelinek <jakub@redhat.com>
Wed, 8 Nov 2017 15:48:30 +0000 (16:48 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 8 Nov 2017 15:48:30 +0000 (16:48 +0100)
* g++.dg/pr57878.C (__sso_string_base::_M_get_allocator): Return
a value.

From-SVN: r254537

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/pr57878.C

index ca2f9c7e708471eb3fa64c8748a9e4739b38eab1..4da3435f37ce18df26c08dfc412bd104a38f83cf 100644 (file)
@@ -1,5 +1,8 @@
 2017-11-08  Jakub Jelinek  <jakub@redhat.com>
 
+       * g++.dg/pr57878.C (__sso_string_base::_M_get_allocator): Return
+       a value.
+
        PR tree-optimization/78821
        * gcc.dg/store_merging_2.c: Expect 3 store mergings instead of 2.
        * gcc.dg/store_merging_13.c (f7, f8, f9, f10, f11, f12, f13): New
index 231f9e346b9f8ce77eb482dd2961355063b56e7e..5df2b7c9ef4e6c119a21533d6af21df7c9d76986 100644 (file)
@@ -95,6 +95,8 @@ namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) {
     }
     __sso_string_base(const __sso_string_base& __rcs);
     const _CharT_alloc_type& _M_get_allocator() const {
+      static _CharT_alloc_type c;
+      return c;
     }
   };
   template<typename _CharT, typename _Traits, typename _Alloc>