[Ada] Fix gnat.dg/return3.adb regression

H.J. Lu hjl.tools@gmail.com
Sun Sep 2 15:16:00 GMT 2012


On Sat, May 26, 2012 at 5:00 AM, Eric Botcazou <ebotcazou@adacore.com> wrote:
> 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.
>
>

This caused:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54456

-- 
H.J.



More information about the Gcc-patches mailing list