https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120358
--- Comment #7 from Holger Hoffstätte <hol...@applied-asynchrony.com> --- Sorry if the following is unhelpful - I'm just an interested observer. Since I could easily reproduce the problem I decided to poke at things in gdb and got a bit annoyed at the bad test code style. So I un-inlined the call to expected.join() into a local and .. all tests pass. Yay? --- a/tst_qstringtokenizer.cpp.ii +++ b/tst_qstringtokenizer_hh.cpp.ii @@ -257685,7 +257685,8 @@ void tst_QStringTokenizer::basics() const expected = skipped(expected); using namespace std::string_literals; - auto tok = qTokenize(expected.join(u'x'), QLatin1Char('x'), cs, sb); + auto joined = expected.join(u'x'); + auto tok = qTokenize(joined, QLatin1Char('x'), cs, sb); do { if (!QTest::qCompare(toQStringList(tok), expected, "toQStringList(tok)", "expected", "/home/sam/bugs/qt/qtbase-everywhere-src-6.9.0/tests/auto/corelib/text/qs> } Is this maybe a temporary/lifetime thing going wrong?