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 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.

2004-07-28  Eric Christopher  <echristo@redhat.com>

	* tree-inline.c (copy_body_r): Delete UNSAVE_EXPR bits.
        (estimate_num_insns_1): Ditto.
        * tree-pretty-print.c (dump_generic_node): Ditto.
        * tree.c (expr_align): Ditto.
        (unsave_expr): Delete.

Roger
--


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