This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] PR55263


Hello,

This is another ICE in pre_and_rev_post_order_compute, called from
alias.c after register allocation.

The problem is that purge_all_dead_edges can make basic blocks
unreachable. Before my patch of r190602, alias.c handled unreachable
blocks (resulting in missed disambiguations). Now that alias.c walks
instructions in topological order, unreachable blocks are a no-no. But
postreload-cse was never really converted to properly use and maintain
the CFG, and this PR is the second example of this problem (after
PR54385, which I fixed earlier this week).

Fixed by calling cleanup_cfg(0) if edges were purged.

Bootstrapped on x86_64-unknown-linux-gnu, testing in progress.  OK if it passes?

Ciao!
Steven

gcc/
        PR middle-end/55263
        * postreload.c (rest_of_handle_postreload): With non-call exceptions,
        if edges are purged call cleanup_cfg to remove unreachable blocks.

testsuite/
        PR middle-end/55263
        * g++.dg/pr55263.C: New test.

Attachment: PR55263.diff
Description: Binary data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]