Fix pessimization in EH cleanup pass
authorEric Botcazou <ebotcazou@adacore.com>
Wed, 16 Sep 2020 11:06:34 +0000 (13:06 +0200)
committerEric Botcazou <ebotcazou@adacore.com>
Wed, 16 Sep 2020 15:42:51 +0000 (17:42 +0200)
commitaab6194d0898f5c592708fe2d44a14046b4d9097
treee8cbe88c94b858475d9c3d28b8062b08fdf68afd
parent7d1be939e0fbc5ce63ba17db3d20ccc39ac17527
Fix pessimization in EH cleanup pass

This restores the post-order traversal done by cleanup_all_empty_eh in
order to eliminate empty landing pads and also contains a small tweak
to the line debug info to avoid a problematic inheritance for coverage
measurement.

gcc/ChangeLog:
* tree-eh.c (lower_try_finally_dup_block): Backward propagate slocs
to stack restore builtin calls.
(cleanup_all_empty_eh): Do again a post-order traversal of the EH
region tree.

gcc/testsuite/ChangeLog:
* gnat.dg/concat4.adb: New test.
gcc/testsuite/gnat.dg/concat4.adb [new file with mode: 0644]
gcc/tree-eh.c