]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fix incorrect array bounds with -fgnat-encodings=minimal in DWARF
authorEric Botcazou <ebotcazou@adacore.com>
Fri, 7 May 2021 20:52:18 +0000 (22:52 +0200)
committerEric Botcazou <ebotcazou@adacore.com>
Fri, 7 May 2021 21:00:18 +0000 (23:00 +0200)
commit7c4c9fcc0de865876fb25fe75f4ed6e143bd48c0
treef9b34d8fe214acb259b132a0b0af7a519f030910
parent14b0f37a644d7b59e1737fb275ec4fff044972a8
Fix incorrect array bounds with -fgnat-encodings=minimal in DWARF

This makes add_subscript_info query the get_array_descr_info hook for the
actual information when it is defined.

gcc/
* cfgexpand.c (expand_gimple_basic_block): Do not inherit a current
location for the outgoing edges of an empty block.
* dwarf2out.c (add_subscript_info): Retrieve the bounds and index
type by means of the get_array_descr_info langhook, if it is set and
returns true.  Remove obsolete code dealing with unnamed subtypes.
gcc/testsuite/
* gnat.dg/debug18.adb: New test.
gcc/cfgexpand.c
gcc/dwarf2out.c
gcc/testsuite/gnat.dg/debug18.adb [new file with mode: 0644]