[Bug rtl-optimization/89490] [9 Regression] char array constant put in string merge section
bernd.edlinger at hotmail dot de
gcc-bugzilla@gcc.gnu.org
Wed Feb 27 09:43:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89490
--- Comment #27 from Bernd Edlinger <bernd.edlinger at hotmail dot de> ---
(In reply to rsandifo@gcc.gnu.org from comment #24)
>
> I think we should also remove the test in default_use_anchors_for_symbol_p,
> since:
>
> sect = SYMBOL_REF_BLOCK (symbol)->sect;
>
> will surely fault if the block is null. Agree the patch looks good
> with those changes.
>
The reason why there is no segfault here is the call site in expmed.c:
|| SYMBOL_REF_BLOCK (base) == NULL
|| !targetm.use_anchors_for_symbol_p (base))
But I am okay with adding a checking assert as suggested by Jakub.
(messages crossed mid-air, so I will update my patch a second time)
More information about the Gcc-bugs
mailing list