summaryrefslogtreecommitdiff
path: root/gcc/cfgloop.c
diff options
context:
space:
mode:
authorrakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4>2003-01-16 15:49:20 +0000
committerrakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4>2003-01-16 15:49:20 +0000
commit743f4ee2073773e06111b5e8155feb2f8053889d (patch)
tree282c8a9e170d09ff46347e800edda163a0ea8f54 /gcc/cfgloop.c
parent38ac91bf63ac10b9412e9d352cdf5b68e346a318 (diff)
downloadgcc-743f4ee2073773e06111b5e8155feb2f8053889d.tar.gz
2003-01-16 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
* cfgloop.c (flow_loops_find): Fix handling of abnormal edges. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@61393 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cfgloop.c')
-rw-r--r--gcc/cfgloop.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/gcc/cfgloop.c b/gcc/cfgloop.c
index da958c22324..b93302e82c8 100644
--- a/gcc/cfgloop.c
+++ b/gcc/cfgloop.c
@@ -804,19 +804,20 @@ flow_loops_find (loops, flags)
header->loop_depth = 0;
+ /* If we have an abnormal predecessor, do not consider the
+ loop (not worth the problems). */
+ for (e = header->pred; e; e = e->pred_next)
+ if (e->flags & EDGE_ABNORMAL)
+ break;
+ if (e)
+ continue;
+
for (e = header->pred; e; e = e->pred_next)
{
basic_block latch = e->src;
if (e->flags & EDGE_ABNORMAL)
- {
- if (more_latches)
- {
- RESET_BIT (headers, header->index);
- num_loops--;
- }
- break;
- }
+ abort ();
/* Look for back edges where a predecessor is dominated
by this block. A natural loop has a single entry