From: Justin Seyster Date: Sat, 14 Aug 2010 01:59:36 +0000 (-0400) Subject: Fixed bug when duplicating empty basic blocks. X-Git-Tag: release-v1.0~69 X-Git-Url: https://git.fsl.cs.stonybrook.edu/?a=commitdiff_plain;h=dd7bd5af691d68fe49f5444cc8706f2716485457;p=interaspect.git Fixed bug when duplicating empty basic blocks. --- diff --git a/src/aop-duplicate.c b/src/aop-duplicate.c index 5cd2fd8..89d6d57 100644 --- a/src/aop-duplicate.c +++ b/src/aop-duplicate.c @@ -187,12 +187,12 @@ duplicate_function_body (const char *tmpvar_name, gimple call) last_bb = pair_p->new; old_first_stmt = first_stmt (pair_p->old); - aop_assert (old_first_stmt != NULL); /* duplicate_block() does not copy initial labels. Calling gimple_block_label() on the duplicated block will create the label for us. */ - if (gimple_code (old_first_stmt) == GIMPLE_LABEL) + if (old_first_stmt != NULL + && gimple_code (old_first_stmt) == GIMPLE_LABEL) { label_pair lblpair; lblpair.old = gimple_block_label (pair_p->old); @@ -218,7 +218,6 @@ duplicate_function_body (const char *tmpvar_name, gimple call) { gsi_next (&gsi); } - gcc_assert(!gsi_end_p(gsi)); for (; !gsi_end_p (gsi); gsi_next (&gsi)) {