This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/77748] pr77550.C fails on arm-none-eabi
- From: "bernd.edlinger at hotmail dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 27 Sep 2016 08:31:42 +0000
- Subject: [Bug c++/77748] pr77550.C fails on arm-none-eabi
- Auto-submitted: auto-generated
- References: <bug-77748-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77748
--- Comment #5 from Bernd Edlinger <bernd.edlinger at hotmail dot de> ---
I think the problem is that tree libstdc++ functions are called,
but the basic_string structure has been c-reduced.
Especially _Alloc_hider, but when that is removed the test
case does no longer reproduce the original problem....
But at least tow externals can be removed easily.
Does this work?
--- pr77550.C.orig 2016-09-27 10:05:17.812179103 +0200
+++ pr77550.C 2016-09-27 10:13:50.407075199 +0200
@@ -231,9 +231,8 @@
} _M_dataplus;
size_type _M_string_length;
enum { _S_local_capacity = 15 } _M_local_buf[_S_local_capacity];
- pointer _M_local_data();
- void _M_set_length(size_type);
- basic_string() : _M_dataplus(_M_local_data()) { _M_set_length(0); }
+ pointer _M_local_data() { return 0; }
+ basic_string() : _M_dataplus(_M_local_data()) {}
basic_string(const basic_string &) : _M_dataplus(0) {}
size_type size() { return _M_string_length; }
char *data() const {}