Fix assembler name collision
authorEric Botcazou <ebotcazou@adacore.com>
Mon, 7 Dec 2020 09:40:23 +0000 (10:40 +0100)
committerEric Botcazou <ebotcazou@adacore.com>
Mon, 7 Dec 2020 09:40:23 +0000 (10:40 +0100)
commit6a1e04b2f0c28d46e193d30aac00a32ba850bf0a
tree8338a2aa740d9909f6dd700738458c64db049672
parent6fb8da750ff53faec52aaa6cda31fbc510219926
Fix assembler name collision

Gigi uses a dummy global variable to register global types for debug
info purposes and its name can now collide with user variables.

gcc/ada/ChangeLog:
* gcc-interface/trans.c (lvalue_for_aggregate_p): Also return true
for return statements.
* gcc-interface/utils.c (gnat_write_global_declarations): Use the
maximum index for the dummy object to avoid a name collision.
gcc/ada/gcc-interface/trans.c
gcc/ada/gcc-interface/utils.c