Add clobber for object, after last use.

gcc/
	* omp-low.c (lower_omp_target): Add clobber for sizes array, after
	last use.

From-SVN: r207723
This commit is contained in:
Thomas Schwinge 2014-02-12 15:46:19 +01:00 committed by Thomas Schwinge
parent 64e5ace535
commit bae729a29f
2 changed files with 10 additions and 0 deletions

View File

@ -1,5 +1,8 @@
2014-02-12 Thomas Schwinge <thomas@codesourcery.com>
* omp-low.c (lower_omp_target): Add clobber for sizes array, after
last use.
* omp-low.c (diagnose_sb_0): Make sure label_ctx is valid to
dereference.

View File

@ -9812,6 +9812,13 @@ lower_omp_target (gimple_stmt_iterator *gsi_p, omp_context *ctx)
TREE_VEC_ELT (t, 1)),
&initlist, true, NULL_TREE);
gimple_seq_add_seq (&ilist, initlist);
tree clobber = build_constructor (TREE_TYPE (TREE_VEC_ELT (t, 1)),
NULL);
TREE_THIS_VOLATILE (clobber) = 1;
gimple_seq_add_stmt (&olist,
gimple_build_assign (TREE_VEC_ELT (t, 1),
clobber));
}
tree clobber = build_constructor (ctx->record_type, NULL);