[Bug middle-end/38271] [4.4 Regression] Spurious / missing "... used uninitialized in this function" warning
rguenth at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Fri Dec 5 13:06:00 GMT 2008
------- Comment #7 from rguenth at gcc dot gnu dot org 2008-12-05 13:05 -------
The following would make SRA only combine all of the struct or nothing. That
avoids these messy situations:
Index: tree-sra.c
===================================================================
--- tree-sra.c (revision 142469)
+++ tree-sra.c (working copy)
@@ -1695,7 +1695,10 @@ try_instantiate_multiple_fields (struct
gcc_assert (~alchk < align);
- /* Create the field group as a single variable. */
+ /* Create the field group as a single variable if the group covers
+ the whole element. */
+ if (size != TREE_INT_CST_LOW (TYPE_SIZE (TREE_TYPE (elt->element))))
+ return f;
/* We used to create a type for the mode above, but size turns
to be out not of mode-size. As we need a matching type
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38271
More information about the Gcc-bugs
mailing list