Commit dca26746 by Richard Guenther Committed by Richard Biener

re PR tree-optimization/45750 (ICE: in iterative_hash_expr, at tree.c:6831 on invalid code)

2010-09-23  Richard Guenther  <rguenther@suse.de>

	PR middle-end/45750
	* gimplify.c (gimplify_expr): Properly pass on GS_ERROR when
	gimplifying MEM_REF.

	* gcc.dg/pr45750.c: New testcase.

From-SVN: r164555
parent 030ef1fb
2010-09-23 Richard Guenther <rguenther@suse.de>
PR middle-end/45750
* gimplify.c (gimplify_expr): Properly pass on GS_ERROR when
gimplifying MEM_REF.
2010-09-23 Alan Modra <amodra@gmail.com>
* config/rs6000/rs6000.c (toc_relative_ok): Delete.
......@@ -6809,8 +6809,10 @@ gimplify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p,
ret = gimplify_expr (&TREE_OPERAND (*expr_p, 0), pre_p, post_p,
is_gimple_reg, fb_rvalue);
recalculate_side_effects (*expr_p);
if (ret == GS_ERROR)
break;
recalculate_side_effects (*expr_p);
*expr_p = fold_build2_loc (input_location, MEM_REF,
TREE_TYPE (*expr_p),
TREE_OPERAND (*expr_p, 0),
......@@ -6835,6 +6837,8 @@ gimplify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p,
}
ret = gimplify_expr (&TREE_OPERAND (*expr_p, 0), pre_p, post_p,
is_gimple_mem_ref_addr, fb_rvalue);
if (ret == GS_ERROR)
break;
recalculate_side_effects (*expr_p);
ret = GS_ALL_DONE;
break;
......
2010-09-23 Richard Guenther <rguenther@suse.de>
PR middle-end/45750
* gcc.dg/pr45750.c: New testcase.
2010-09-23 Jakub Jelinek <jakub@redhat.com>
* gcc.dg/torture/stackalign/alloca-4.c: Remove -m32 from dg-options.
......
/* { dg-do compile } */
/* { dg-options "-O" } */
struct S
{
int i;
};
int invalid[] = 0; /* { dg-error "invalid initializer" } */
void foo (void)
{
if (((struct S *)undeclared)->i); /* { dg-error "undeclared" } */
}
/* { dg-message "reported only once" "" { target *-*-* } 13 } */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment