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

--- Comment #11 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #8)
> One way would be either not to call rtl = expand_expr (init, NULL_RTX,
> VOIDmode, EXPAND_INITIALIZER); during early_dwarf or do some extra checks
> whether it is safe.  I see for the early_dwarf case it does
> native_encode_initializer through which obviously nothing that needs
> relocation like addresses of vars will make it through, so e.g. punting for
> early_dwarf before expand_expr if it refers to any decls would do the job.

Yes, early dwarf may not encode references to other decls - those may go
away when optimizing.  It may only refer to those via dwarf, but not via
locations and symbol-refs.

Reply via email to