Commit 3111cce0 by Richard Guenther Committed by Richard Biener

re PR middle-end/40328 (internal compiler error: in set_ssa_val_to, at tree-ssa-sccvn.c:1811)

2009-06-03  Richard Guenther  <rguenther@suse.de>

	PR middle-end/40328
	* fold-const.c (fold_convert): Fold the build COMPLEX_EXPR.

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

From-SVN: r148134
parent 5e1b50f6
2009-06-03 Richard Guenther <rguenther@suse.de>
PR middle-end/40328
* fold-const.c (fold_convert): Fold the build COMPLEX_EXPR.
2009-06-03 Andrey Belevantsev <abel@ispras.ru>
* statistics.c (statistics_counter_event): Do not record event
......
......@@ -2643,9 +2643,10 @@ fold_convert (tree type, tree arg)
case POINTER_TYPE: case REFERENCE_TYPE:
case REAL_TYPE:
case FIXED_POINT_TYPE:
return build2 (COMPLEX_EXPR, type,
fold_convert (TREE_TYPE (type), arg),
fold_convert (TREE_TYPE (type), integer_zero_node));
return fold_build2 (COMPLEX_EXPR, type,
fold_convert (TREE_TYPE (type), arg),
fold_convert (TREE_TYPE (type),
integer_zero_node));
case COMPLEX_TYPE:
{
tree rpart, ipart;
......
2009-06-03 Richard Guenther <rguenther@suse.de>
PR middle-end/40328
* gcc.dg/torture/pr40328.c: New testcase.
2009-06-03 Martin Jambor <mjambor@suse.cz>
* g++.dg/torture/pr40323.C: New file.
......
/* { dg-do compile } */
/* { dg-options "-fno-tree-sra" } */
_Complex float foo(void)
{
_Complex float a[64] = {};
_Complex float x;
x = a[1];
return x;
}
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