https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86687
--- Comment #1 from Nikolay Piskun <nikolay.piskun at roguewave dot com> --- Created attachment 44448 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44448&action=edit Test program How to reproduce; Set a breakpoint on line 48 Look at two variable: base (passed as reference) and dir_hint (passed as copy). They should be the same values, but second one is wrong. Looks like compiler passed it as reference ( type print *dir_hint), but debug information is emitted as type class string. I think the problem is a mismatch. Compiler is smart enough to realized, that data is shared among strings and put a reference as parameter, but debug information is still for copy of value. Same proble, is with shared QStrings and possibly other shared types.