[Ada] Fix gnat.dg/return3.adb regression
Eric Botcazou
ebotcazou@adacore.com
Sat May 26 12:05:00 GMT 2012
The problem is that the new call to cleanup_cfg in gimple_expand_cfg has
short-circuited the machinery that emits nops to carry goto locus at -O0.
The machinery works in CFGLAYOUT mode, but here we're still in CFGRTL.
The attached patch makes it so that forwarder blocks are not deleted by
try_optimize_cfg if CLEANUP_NO_INSN_DEL and partially extends the above
machinery to the CFGRTL mode.
Bootstrapped/regtested on x86_64-suse-linux, applied on the mainline.
2012-05-26 Eric Botcazou <ebotcazou@adacore.com>
* cfgcleanup.c (try_optimize_cfg): Do not delete forwarder blocks
if CLEANUP_NO_INSN_DEL.
* cfgrtl.c (unique_locus_on_edge_between_p): New function extracted
from cfg_layout_merge_blocks.
(emit_nop_for_unique_locus_between): New function.
(rtl_merge_blocks): Invoke emit_nop_for_unique_locus_between.
(cfg_layout_merge_blocks): Likewise.
--
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p.diff
Type: text/x-diff
Size: 4881 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20120526/b9cb3bef/attachment.bin>
More information about the Gcc-patches
mailing list