[Bug debug/94469] lto abstract variable emitted as concrete decl (ada test-case)

vries at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Apr 6 09:49:07 GMT 2020


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

--- Comment #4 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Tom de Vries from comment #2)
(In reply to Richard Biener from comment #3)
> Ah, thanks for the hints - that's something I can work with more easily than
> an Ada testcase ;)

Sure :)

FWIW, the gdb behaviour is somewhat flaky, so this reproduces what I had:
...
$ gdb -batch a.out -ex "p aaa" -ex "p bbb" -ex "p ccc"
$1 = 0
$2 = <optimized out>
$3 = <optimized out>
...
but if I drop printing aaa, I do get the value of bbb:
...
$ gdb -batch a.out -ex "p bbb" -ex "p ccc"
$1 = 0
$2 = <optimized out>
...
So this also seems to interact with partial symbol tables.

To reproduce this reliably, just skip partial symbols tables using -readnow:
...
$ gdb -readnow -batch a.out -ex "p aaa" -ex "p bbb" -ex "p ccc"
$1 = <optimized out>
$2 = <optimized out>
$3 = <optimized out>
...
and now also the problem surfaces for aaa.


More information about the Gcc-bugs mailing list