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 ca2f9c7..4da3435 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 231f9e3..5df2b7c 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>