https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127085

Aldy Hernandez <aldyh at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rguenth at gcc dot gnu.org

--- Comment #2 from Aldy Hernandez <aldyh at gcc dot gnu.org> ---
I’m seeing:

aldyh@cfarm136:~/gcc/bld/scratch-pr127085-orig/build/gcc$ ./cc1 -quiet -Os a.c 
a.c: In function ‘f19’:
a.c:8:6: error: loop with header 7 not in loop tree
...

Could I get a little hint here, cause I thought I was already excluding loops:

+preserves_loop_structure_p (edge e)
+{
+  basic_block bb = e->dest;
+
+  if ((e->flags & EDGE_DFS_BACK)
+      || e->src->loop_father != bb->loop_father)
+    return false;
+
+  edge s;
+  edge_iterator ei;
+  FOR_EACH_EDGE (s, ei, bb->succs)
+    if ((s->flags & EDGE_DFS_BACK)
+       || s->dest->loop_father != bb->loop_father)
+      return false;
+
+  return true;
+}

Is there a stricter way of not messing up loops, or not creating ones, which I
assume is what’s going on here?

Reply via email to