From 61fc3b8f78c581e4091a767b84ee57ab4670921c Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Tue, 30 Jul 2013 11:19:56 +0200 Subject: [PATCH] fix handling of compound statements with initial partial scop when autodetecting If the partial scop is the first scop we find in the compound statement, then we intended to keep it as the scop of the compound statement, but this behavior was broken in 01193ea (accept compound statements with zero statements when autodetecting, Mon Aug 22 13:39:33 2011 +0200). Signed-off-by: Sven Verdoolaege --- scan.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scan.cc b/scan.cc index a7bd75f..d406dfb 100644 --- a/scan.cc +++ b/scan.cc @@ -4875,7 +4875,7 @@ struct pet_scop *PetScan::extract(StmtRange stmt_range, bool block, continue; scop_i = extract(child); - if (scop && partial) { + if (scop->n_stmt != 0 && partial) { pet_scop_free(scop_i); break; } -- 2.11.4.GIT