diff options
author | Richard Guenther <rguenther@suse.de> | 2009-06-03 15:30:52 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2009-06-03 15:30:52 +0000 |
commit | 3111cce0d99ddd6414f38042cd3e19aeee2f9cc4 (patch) | |
tree | e6ef21402faec30aac26293ccd3333d303df009c /gcc/fold-const.c | |
parent | 5e1b50f68bda115d24af7f9ff13196e488eb59a5 (diff) | |
download | gcc-3111cce0d99ddd6414f38042cd3e19aeee2f9cc4.zip gcc-3111cce0d99ddd6414f38042cd3e19aeee2f9cc4.tar.gz gcc-3111cce0d99ddd6414f38042cd3e19aeee2f9cc4.tar.bz2 |
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
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r-- | gcc/fold-const.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 03f6805..ab3942f 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -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; |