diff options
author | sayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-09-11 23:44:21 +0000 |
---|---|---|
committer | sayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-09-11 23:44:21 +0000 |
commit | df7707477a387cd0f56e8500b7c65f393953753e (patch) | |
tree | 0f19177b7e46d272f7ff9c2f948d1da7b4787c9e /gcc/tree-sra.c | |
parent | 9c08427a470bf0244808f4dcb633490d43f1fb8b (diff) | |
download | ppe42-gcc-df7707477a387cd0f56e8500b7c65f393953753e.tar.gz ppe42-gcc-df7707477a387cd0f56e8500b7c65f393953753e.zip |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87377 138bc75d-0d04-0410-961f-82ee72b054a4
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 b8ec2e1ff89..cde865ad285 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); |