re PR tree-optimization/34127 (ICE: tree-ssa-operands.c:1688)

2007-11-18  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/34127
	* tree-ssa-forwprop.c (tree_ssa_forward_propagate_single_use_vars):
	Make code match up the comments, require compatibility of the
	pointed-to types.

	* gcc.c-torture/compile/pr34127.c: New testcase.

From-SVN: r130269
This commit is contained in:
Richard Guenther 2007-11-18 15:49:57 +00:00 committed by Richard Biener
parent 6c4322d7a2
commit 4ba480060a
4 changed files with 23 additions and 2 deletions

View File

@ -1,3 +1,10 @@
2007-11-18 Richard Guenther <rguenther@suse.de>
PR tree-optimization/34127
* tree-ssa-forwprop.c (tree_ssa_forward_propagate_single_use_vars):
Make code match up the comments, require compatibility of the
pointed-to types.
2007-11-17 Richard Guenther <rguenther@suse.de>
PR middle-end/34130

View File

@ -1,3 +1,8 @@
2007-11-18 Richard Guenther <rguenther@suse.de>
PR tree-optimization/34127
* gcc.c-torture/compile/pr34127.c: New testcase.
2007-11-18 Ben Elliston <bje@au.ibm.com>
* gcc.target/powerpc/altivec-23.c: Do not use a typedef name as a

View File

@ -0,0 +1,9 @@
static void
whichtable(char **pfmt)
{
--*pfmt;
}
void prepare_s(const char *fmt)
{
whichtable((char **)&fmt);
}

View File

@ -959,8 +959,8 @@ tree_ssa_forward_propagate_single_use_vars (void)
|| TREE_CODE (rhs) == CONVERT_EXPR)
&& TREE_CODE (TREE_OPERAND (rhs, 0)) == ADDR_EXPR
&& POINTER_TYPE_P (TREE_TYPE (rhs))
&& useless_type_conversion_p (TREE_TYPE (TREE_TYPE (TREE_OPERAND (rhs, 0))),
TREE_TYPE (TREE_TYPE (rhs)))))
&& types_compatible_p (TREE_TYPE (TREE_TYPE (TREE_OPERAND (rhs, 0))),
TREE_TYPE (TREE_TYPE (rhs)))))
{
if (forward_propagate_addr_expr (lhs, rhs))
{