Commit 40311329 by Richard Biener Committed by Richard Biener

re PR tree-optimization/69242 (ICE in visit_reference_op_load, at tree-ssa-sccvn.c:3224)

2016-01-13  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/69242
	* tree-ssa-sccvn.c (visit_reference_op_load): Replace bogus
	assert with a check.

	* gcc.dg/torture/pr69242.c: New testcase.

From-SVN: r232315
parent ccbd7103
2016-01-13 Richard Biener <rguenther@suse.de> 2016-01-13 Richard Biener <rguenther@suse.de>
PR tree-optimization/69242
* tree-ssa-sccvn.c (visit_reference_op_load): Replace bogus
assert with a check.
2016-01-13 Richard Biener <rguenther@suse.de>
PR tree-optimization/69186 PR tree-optimization/69186
* tree-vect-data-refs.c (vect_enhance_data_refs_alignment): * tree-vect-data-refs.c (vect_enhance_data_refs_alignment):
Properly guard vect_update_misalignment_for_peel call. Properly guard vect_update_misalignment_for_peel call.
......
2016-01-13 Richard Biener <rguenther@suse.de> 2016-01-13 Richard Biener <rguenther@suse.de>
PR tree-optimization/69242
* gcc.dg/torture/pr69242.c: New testcase.
2016-01-13 Richard Biener <rguenther@suse.de>
PR tree-optimization/69186 PR tree-optimization/69186
* gcc.dg/torture/pr69186.c: New testcase. * gcc.dg/torture/pr69186.c: New testcase.
......
/* { dg-do compile } */
/* { dg-additional-options "-w" } */
int a[1];
void *memcpy();
int smx_ctx_base_factory_create_context_sized();
void getcontext();
void smx_ctx_sysv_create_context() {
int *b = (int *)smx_ctx_base_factory_create_context_sized();
getcontext();
memcpy(a, &b, sizeof(int));
switch (a[0])
;
}
...@@ -3221,8 +3221,11 @@ visit_reference_op_load (tree lhs, tree op, gimple *stmt) ...@@ -3221,8 +3221,11 @@ visit_reference_op_load (tree lhs, tree op, gimple *stmt)
gimple_seq stmts = NULL; gimple_seq stmts = NULL;
result = maybe_push_res_to_seq (rcode, TREE_TYPE (op), ops, result = maybe_push_res_to_seq (rcode, TREE_TYPE (op), ops,
&stmts); &stmts);
gcc_assert (result && gimple_seq_singleton_p (stmts)); if (result)
new_stmt = gimple_seq_first_stmt (stmts); {
gcc_assert (gimple_seq_singleton_p (stmts));
new_stmt = gimple_seq_first_stmt (stmts);
}
} }
else else
/* The expression is already available. */ /* The expression is already available. */
......
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