Commit a8afd67b by Jim Wilson Committed by Jim Wilson

Fix solaris2 loop-2d.c failure reported by Manfred Hollstein.

	* haifa-sched.c (build_control_flow): Set unreachable for block whose
	only predecessor is itself.

From-SVN: r19021
parent 944fc8ab
Mon Apr 6 17:23:41 1998 Jim Wilson <wilson@cygnus.com>
* haifa-sched.c (build_control_flow): Set unreachable for block whose
only predecessor is itself.
Mon Apr 6 16:08:04 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> Mon Apr 6 16:08:04 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* c-parse.in: Include system.h, and remove stuff now made redundant. * c-parse.in: Include system.h, and remove stuff now made redundant.
......
...@@ -1220,7 +1220,10 @@ build_control_flow () ...@@ -1220,7 +1220,10 @@ build_control_flow ()
for (i = 0; i < n_basic_blocks; i++) for (i = 0; i < n_basic_blocks; i++)
{ {
nr_edges += num_succs[i]; nr_edges += num_succs[i];
if (num_preds[i] == 0) /* ??? We must also detect unreachable loops here. We only handle the
trivial case of a loop with one basic block for now. */
if (num_preds[i] == 0
|| (num_preds[i] == 1 && INT_LIST_VAL (s_preds[i]) == i))
unreachable = 1; unreachable = 1;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment