[Bug fortran/40168] missing unrolling/scalarization/reassoc/free
rguenth at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sat May 16 10:04:00 GMT 2009
------- Comment #3 from rguenth at gcc dot gnu dot org 2009-05-16 10:04 -------
Like so:
Index: trans-expr.c
===================================================================
--- trans-expr.c (revision 147583)
+++ trans-expr.c (working copy)
@@ -4430,7 +4430,8 @@ gfc_trans_zero_assign (gfc_expr * expr)
/* Convert arguments to the correct types. */
if (!POINTER_TYPE_P (TREE_TYPE (dest)))
- dest = gfc_build_addr_expr (pvoid_type_node, dest);
+ return build2 (MODIFY_EXPR, void_type_node,
+ dest, build_constructor (TREE_TYPE (dest), NULL));
else
dest = fold_convert (pvoid_type_node, dest);
len = fold_convert (size_type_node, len);
that leaves FRE to figure that it can CSE a zero from
array1 = {};
in
buffer1 = {};
D.2743_415 = buffer1[54];
and similar cases. buffer2 is later scalarized by SRA.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40168
More information about the Gcc-bugs
mailing list