[Bug lto/84213] [8 Regression] 521.wrf_r from SPEC 2017 fails to build (link) with LTO
rguenther at suse dot de
gcc-bugzilla@gcc.gnu.org
Thu Feb 8 12:53:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84213
--- Comment #8 from rguenther at suse dot de <rguenther at suse dot de> ---
On Thu, 8 Feb 2018, derodat at adacore dot com wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84213
>
> Pierre-Marie de Rodat <derodat at adacore dot com> changed:
>
> What |Removed |Added
> ----------------------------------------------------------------------------
> CC| |derodat at adacore dot com
>
> --- Comment #7 from Pierre-Marie de Rodat <derodat at adacore dot com> ---
> Hello,
>
> (In reply to Richard Biener from comment #6)
> > I'm quite sure the rev. is responsible for similar Ada -flto -g failures.
> > We simply may _not_ add location attributes early.
>
> I did not have a deep look at this, so I’m asking: is it possible to add it
> late, then?
>
> > So I think we need to revert this patch and instead make sure those
> > Ada variables do not get removed? Like by marking them with
> > DECL_PRESERVE_P?
> >
> > Trying that (figuring where those decls are created). Pierre-Marie,
> > maybe you can help here as well.
>
> IIRC, what my r248792 is about is not to preserve the DW_TAG_varible itself (it
> was already present in the DWARF output before), but to make sure we have a
> location for it: if we have a DW_TAG_variable entry without a DW_AT_location
> attribute, GDB will consider that the variable does not exist and thus we’ll
> loose debuggability in Ada.
Yeah, setting DECL_PRESERVE_P would make it possible to add the
location late since we'd not remove the decl. Currently it's simply
gone and the early dwarf2out_"late"_global_decl is the last thing
we see from it...
Currently struggling in getting a debuggable gnat1 built .. it looks
like ./configure --enable-languages=c++,ada --disable-bootstrap
no longer works with a host compiler that doesn't understand some
C++ specs that appear to be used (GCC 4.8).
More information about the Gcc-bugs
mailing list