[Bug debug/86687] Wrong debug information for string types passed as parameters

nikolay.piskun at roguewave dot com gcc-bugzilla@gcc.gnu.org
Thu Jul 26 16:04:00 GMT 2018


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86687

--- Comment #2 from Nikolay Piskun <nikolay.piskun at roguewave dot com> ---
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.


More information about the Gcc-bugs mailing list