re PR objc++/68511 (FAIL: obj-c++.dg/property/dotsyntax-11.mm -fgnu-runtime (test for errors, line 51,56,59))

PR objc++/68511
	PR c++/69213
	* cp-gimplify.c (cp_gimplify_expr) <case INIT_EXPR>: Don't return
	GS_ERROR whenever seen_error (), only if *expr_p contains
	cilk spawn stmt, but cilk_detect_spawn_and_unwrap failed.

	* g++.dg/opt/pr69213.C: New test.

From-SVN: r232278
This commit is contained in:
Jakub Jelinek 2016-01-12 16:21:27 +01:00 committed by Jakub Jelinek
parent 9eaaa83013
commit 65364cc5f0
4 changed files with 39 additions and 6 deletions

View File

@ -1,5 +1,11 @@
2016-01-12 Jakub Jelinek <jakub@redhat.com> 2016-01-12 Jakub Jelinek <jakub@redhat.com>
PR objc++/68511
PR c++/69213
* cp-gimplify.c (cp_gimplify_expr) <case INIT_EXPR>: Don't return
GS_ERROR whenever seen_error (), only if *expr_p contains
cilk spawn stmt, but cilk_detect_spawn_and_unwrap failed.
PR c++/66808 PR c++/66808
PR c++/69000 PR c++/69000
* pt.c (tsubst_decl): If not local_p, clear DECL_TEMPLATE_INFO. * pt.c (tsubst_decl): If not local_p, clear DECL_TEMPLATE_INFO.

View File

@ -617,14 +617,17 @@ cp_gimplify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p)
LHS of an assignment might also be involved in the RHS, as in bug LHS of an assignment might also be involved in the RHS, as in bug
25979. */ 25979. */
case INIT_EXPR: case INIT_EXPR:
if (fn_contains_cilk_spawn_p (cfun) if (fn_contains_cilk_spawn_p (cfun))
&& cilk_detect_spawn_and_unwrap (expr_p))
{ {
cilk_cp_gimplify_call_params_in_spawned_fn (expr_p, pre_p, post_p); if (cilk_detect_spawn_and_unwrap (expr_p))
{
cilk_cp_gimplify_call_params_in_spawned_fn (expr_p,
pre_p, post_p);
return (enum gimplify_status) gimplify_cilk_spawn (expr_p); return (enum gimplify_status) gimplify_cilk_spawn (expr_p);
} }
if (seen_error ()) if (seen_error () && contains_cilk_spawn_stmt (*expr_p))
return GS_ERROR; return GS_ERROR;
}
cp_gimplify_init_expr (expr_p); cp_gimplify_init_expr (expr_p);
if (TREE_CODE (*expr_p) != INIT_EXPR) if (TREE_CODE (*expr_p) != INIT_EXPR)

View File

@ -1,3 +1,9 @@
2016-01-12 Jakub Jelinek <jakub@redhat.com>
PR objc++/68511
PR c++/69213
* g++.dg/opt/pr69213.C: New test.
2016-01-12 Christian Bruel <christian.bruel@st.com> 2016-01-12 Christian Bruel <christian.bruel@st.com>
PR target/69180 PR target/69180

View File

@ -0,0 +1,18 @@
// PR c++/69213
// { dg-do compile }
// { dg-options "-O3" }
int a, b;
void
foo (void)
{
__asm__ ("# %0" : : : "memory"); // { dg-error "operand number out of range" }
}
int
main ()
{
for (; a < 0; b++)
a = b;
}