Commit 48acf1b7 by Richard Guenther Committed by Richard Biener

re PR tree-optimization/50363 (internal compiler error: verify_gimple failed)

2011-09-27  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/50363
	* tree-ssa-pre.c (create_expression_by_pieces): Handle
	pointer conversions in POINTER_PLUS_EXPRs properly.

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

From-SVN: r179247
parent ddfd2edf
2011-09-27 Richard Guenther <rguenther@suse.de>
PR tree-optimization/50363
* tree-ssa-pre.c (create_expression_by_pieces): Handle
pointer conversions in POINTER_PLUS_EXPRs properly.
2011-09-27 Richard Sandiford <richard.sandiford@linaro.org>
* config/arm/neon.md (neon_vget_highv16qi, neon_vget_highv8hi)
2011-09-27 Richard Guenther <rguenther@suse.de>
PR tree-optimization/50363
* gcc.dg/torture/pr50363.c: New testcase.
2011-09-26 Jason Merrill <jason@redhat.com>
PR c++/45012
......
/* { dg-do compile } */
/* { dg-options "-fno-tree-ch -fno-tree-fre" } */
void
foo (int *__restrict__ * r, int n)
{
int *p;
for (p = *r; p < *r + n; p++)
;
}
......@@ -3085,11 +3085,15 @@ create_expression_by_pieces (basic_block block, pre_expr expr,
stmts, domstmt);
if (!genop[i])
return NULL_TREE;
/* Ensure genop[1] is a ptrofftype for POINTER_PLUS_EXPR. It
may be a constant with the wrong type. */
if (i == 1
&& nary->opcode == POINTER_PLUS_EXPR)
genop[i] = convert_to_ptrofftype (genop[i]);
/* Ensure genop[] is properly typed for POINTER_PLUS_EXPR. It
may have conversions stripped. */
if (nary->opcode == POINTER_PLUS_EXPR)
{
if (i == 0)
genop[i] = fold_convert (nary->type, genop[i]);
else if (i == 1)
genop[i] = convert_to_ptrofftype (genop[i]);
}
else
genop[i] = fold_convert (TREE_TYPE (nary->op[i]), genop[i]);
}
......
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