diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2021-05-07 22:52:18 +0200 |
---|---|---|
committer | Eric Botcazou <ebotcazou@adacore.com> | 2021-05-07 23:00:18 +0200 |
commit | 7c4c9fcc0de865876fb25fe75f4ed6e143bd48c0 (patch) | |
tree | f9b34d8fe214acb259b132a0b0af7a519f030910 /gcc/cfgexpand.c | |
parent | 14b0f37a644d7b59e1737fb275ec4fff044972a8 (diff) | |
download | gcc-7c4c9fcc0de865876fb25fe75f4ed6e143bd48c0.zip gcc-7c4c9fcc0de865876fb25fe75f4ed6e143bd48c0.tar.gz gcc-7c4c9fcc0de865876fb25fe75f4ed6e143bd48c0.tar.bz2 |
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.
Diffstat (limited to 'gcc/cfgexpand.c')
-rw-r--r-- | gcc/cfgexpand.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index 556a0b2..747ca3e 100644 --- a/gcc/cfgexpand.c +++ b/gcc/cfgexpand.c @@ -6056,7 +6056,7 @@ expand_gimple_basic_block (basic_block bb, bool disable_tail_calls) /* Expand implicit goto and convert goto_locus. */ FOR_EACH_EDGE (e, ei, bb->succs) { - if (e->goto_locus != UNKNOWN_LOCATION) + if (e->goto_locus != UNKNOWN_LOCATION || !stmt) set_curr_insn_location (e->goto_locus); if ((e->flags & EDGE_FALLTHRU) && e->dest != bb->next_bb) { |