https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114085
Jeffrey A. Law <law at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2025-01-26
Ever confirmed|0 |1
--- Comment #3 from Jeffrey A. Law <law at gcc dot gnu.org> ---
Simpler testcase that still triggers the same core issue at -O2 -fpermissive
-fexceptions -std=c++11:
inline namespace __cxx11 {
class basic_string;
}
typedef basic_string string;
template <typename, typename _Container> struct __normal_iterator {
template <typename _Iter>
__normal_iterator(__normal_iterator<_Iter, _Container>);
};
namespace __cxx11 {
struct basic_string {
~basic_string();
__normal_iterator<int, basic_string>
insert(__normal_iterator<int, basic_string>, int);
};
} // namespace __cxx11
enum {
_S_dec,
_S_fixed,
_S_hex,
_S_internal,
_S_left,
_S_oct,
_S_right,
_S_scientific,
_S_showbase
};
enum _Ios_Iostate {};
struct ios_base {
typedef _Ios_Iostate iostate;
flags();
};
template <typename> struct istreambuf_iterator {};
struct money_base {
enum { symbol };
};
char _M_extract___p_0_0;
namespace __cxx11 {
template <typename, typename> struct money_get {
template <int>
istreambuf_iterator<char>
_M_extract(istreambuf_iterator<char>, istreambuf_iterator<char>,
ios_base &__io, ios_base::iostate &, string &) const {
bool __testvalid = true;
string __res;
for (; __testvalid;)
switch (_M_extract___p_0_0) {
case money_base::symbol:
if (__io.flags() & _S_showbase)
__testvalid = false;
__normal_iterator<char, basic_string> __trans_tmp_1 =
__res.insert(__trans_tmp_1, '-');
}
}
};
} // namespace __cxx11
template istreambuf_iterator<char>
money_get<char, char>::_M_extract<false>(istreambuf_iterator<char>,
istreambuf_iterator<char>, ios_base &,
ios_base::iostate &, string &) const;