This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/55270] [4.8 Regression] ICE in get_loop_body, at cfgloop.c:823
- From: "mpolacek at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 28 Jan 2013 13:33:47 +0000
- Subject: [Bug rtl-optimization/55270] [4.8 Regression] ICE in get_loop_body, at cfgloop.c:823
- Auto-submitted: auto-generated
- References: <bug-55270-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55270
--- Comment #4 from Marek Polacek <mpolacek at gcc dot gnu.org> 2013-01-28 13:33:47 UTC ---
The problem here is in dfs_enumerate_from, which wrongly detects the number of
BBs in a loop. get_loop_body_with_size calls dfs_enumerate_from with reverse =
1, thus we go against direction of edges. I.e., we start at the header, then
go through its predecessors and if the predecessor hasn't been visited yet and
is dominated by the header, we count it. But, we don't count BB which only has
an exit edge--thus its successor is outside of the loop. Moving in !reverse
direction doesn't seem to help. I'm not exactly sure what to do here, I'm
afraid of touching dfs_enumerate_from algorithm ;).