[Bug 157] using -O{1,2,3} together with -g causes ICE (seg fault)
via D.gnu
d.gnu at puremagic.com
Wed Aug 2 11:47:26 PDT 2017
https://bugzilla.gdcproject.org/show_bug.cgi?id=157
--- Comment #6 from Johannes Pfau <johannespfau at gmail.com> ---
> Are you sure? I mean, if this is a nested instantiation, then it will be treated as non-public (static in the C sense). So any unreferenced functions will be removed by the middle-end.
It doesn't even show up in -fdump-tree-original though and I think it should be
there? Also the toChars function is not a nasted template (See conv.d in the
attached test case). And the backend still emits an 'undefined' reference so
this is not a case of completely removing the symbol.
> But at the same time, I'd like to minimise just how much effort is put into the older versions. Granted that they should be effectively in maintenance mode by now. ;-)
Indeed. 'Usually' such problems don't appear though and backports are a simple
git merge.
> Looking at 4.9, I see that the same patch was applied as version 5. So I was initially unsure why you have a problem.
OK, I see. Removing !lto worked around the problem, but it will then probably
trigger the other regression you linked ;-)
> The "proper" fix is already done in master (calling register_main_translation_unit), so I assume this is in all branches up to gcc-5 as well.
register_main_translation_unit is not in gcc 4.9 or 4.8, it was introduced in
gcc-5 to fix the follow-up bug you linked. Not sure if I want to introduce such
changes into our GCC patches though...
Maybe I'll just disable debug info generation when building phobos and keep
this as a won't fix for < 4.9.
--
You are receiving this mail because:
You are watching all bug changes.
More information about the D.gnu
mailing list