This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH]: Fix tree-optimization/22404


The offset was not getting set right on the first field when it was not
0 (this bug was exposed by Diego's change since before we would get it
right if the variable had SFT's)

Bootstrapped and regtested on i686-pc-linux-gnu, applied to mainline
(along with a test case).


Index: tree-ssa-structalias.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-ssa-structalias.c,v
retrieving revision 2.16
diff -u -p -r2.16 tree-ssa-structalias.c
--- tree-ssa-structalias.c	11 Jul 2005 02:38:30 -0000	2.16
+++ tree-ssa-structalias.c	11 Jul 2005 14:47:31 -0000
@@ -3065,6 +3065,7 @@ create_variable_info_for (tree decl, con
       
       field = fo->field;
       vi->size = TREE_INT_CST_LOW (DECL_SIZE (field));
+      vi->offset = fo->offset;
       for (i = 1; VEC_iterate (fieldoff_s, fieldstack, i, fo); i++)
 	{
 	  varinfo_t newvi;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]