tree2scop.c: is_nested_allowed: do not allow nesting if current level has break
commit1454a50c3e4d81991744a106fe009c04855b2f55
authorSven Verdoolaege <skimo@kotnet.org>
Thu, 19 Jun 2014 15:45:51 +0000 (19 17:45 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Thu, 19 Jun 2014 15:45:51 +0000 (19 17:45 +0200)
treec268bee386965e015d496ba0cb6e3a8b5fe1c3c1
parent655800a1cc34d0d709f65ca4dfb2ffe70a740c94
tree2scop.c: is_nested_allowed: do not allow nesting if current level has break

The original code would check for a "now" skip.  In 417afba (tree2scop.c:
is_nested_allowed: take tree instead of scop, Wed Jan 1 14:25:21 2014 +0100),
this was replaced by a check for a continue statement inside the tree.
However, if there is a break statement then we should also not allow
nesting.  A break statement will also result in the "now" skip being
set so the original code got it right.

Reported-by: Alexey Kravets <Alexey.Kravets@arm.com>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
tests/encapsulate/inf_break.c [new file with mode: 0644]
tests/encapsulate/inf_break.scop [new file with mode: 0644]
tree.c
tree.h
tree2scop.c