diff options
author | Roger Sayle <roger@eyesopen.com> | 2004-09-11 23:44:21 +0000 |
---|---|---|
committer | Roger Sayle <sayle@gcc.gnu.org> | 2004-09-11 23:44:21 +0000 |
commit | ec76a0e0bf0a01edee001700b107a4772051d4ba (patch) | |
tree | 0f19177b7e46d272f7ff9c2f948d1da7b4787c9e /gcc/tree-sra.c | |
parent | d6a1dfd98b85ba31c58c4d0f3f53adb3dd0044f1 (diff) | |
download | gcc-ec76a0e0bf0a01edee001700b107a4772051d4ba.zip gcc-ec76a0e0bf0a01edee001700b107a4772051d4ba.tar.gz gcc-ec76a0e0bf0a01edee001700b107a4772051d4ba.tar.bz2 |
re PR middle-end/17411 (ICE in immed_double_const)
PR middle-end/17411
* tree-sra.c (generate_element_zero): Revert recent build_int_cst
change. elt->type may be a floating point type, so use fold_convert.
* g++.dg/opt/pr17411-1.C: New test case.
From-SVN: r87377
Diffstat (limited to 'gcc/tree-sra.c')
-rw-r--r-- | gcc/tree-sra.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c index b8ec2e1..cde865a 100644 --- a/gcc/tree-sra.c +++ b/gcc/tree-sra.c @@ -1534,7 +1534,7 @@ generate_element_zero (struct sra_elt *elt, tree *list_p) tree t; gcc_assert (elt->is_scalar); - t = build_int_cst (elt->type, 0); + t = fold_convert (elt->type, integer_zero_node); t = build (MODIFY_EXPR, void_type_node, elt->replacement, t); append_to_statement_list (t, list_p); |