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]

Re: fix another obscure nested function bug



On Dec 18, 2004, at 1:37 PM, Roger Sayle wrote:



On Sat, 18 Dec 2004, Richard Henderson wrote:

* stor-layout.c (layout_decl): Unshare size expressions copied from the type.

Index: stor-layout.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/stor-layout.c,v
retrieving revision 1.218
diff -c -p -d -u -r1.218 stor-layout.c
--- stor-layout.c	9 Dec 2004 10:54:36 -0000	1.218
+++ stor-layout.c	18 Dec 2004 19:16:56 -0000
@@ -325,8 +325,8 @@ layout_decl (tree decl, unsigned int kno

   if (DECL_SIZE (decl) == 0)
     {
-      DECL_SIZE (decl) = TYPE_SIZE (type);
-      DECL_SIZE_UNIT (decl) = TYPE_SIZE_UNIT (type);
+      DECL_SIZE (decl) = unsave_expr (TYPE_SIZE (type));
+      DECL_SIZE_UNIT (decl) = unsave_expr (TYPE_SIZE_UNIT (type));
     }
   else if (DECL_SIZE_UNIT (decl) == 0)
     DECL_SIZE_UNIT (decl)



Unfortunately, this change breaks bootstrap. The function unsave_expr was deleted from mainline by Eric Christopher's patch back in July.

I think he had meant unshare_expr and not unsave_expr.



-- Pinski



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