[patch] Fix regression in debug info for Ada with DWARF 5

2021-08-16 Thread Eric Botcazou
Hi, add_scalar_info can directly generate a reference to an existing DIE for a scalar attribute, e.g the upper bound of a VLA, but it does so only if this existing DIE has a location or is a constant: if (get_AT (decl_die, DW_AT_location) || get_AT (decl_die, DW_

Re: [patch] Fix regression in debug info for Ada with DWARF 5

2021-08-16 Thread Richard Biener via Gcc-patches
On Mon, Aug 16, 2021 at 12:25 PM Eric Botcazou wrote: > > Hi, > > add_scalar_info can directly generate a reference to an existing DIE for a > scalar attribute, e.g the upper bound of a VLA, but it does so only if this > existing DIE has a location or is a constant: > > if (get_AT (d