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]

Avoid setting DECL_SIZE_UNIT if already set


This fixes a problem where DECL_SIZE_UNIT unnecessarily contains computations
in bitsizetype.

Tested on i686-pc-linux-gnu.

Mon Jan 13 10:31:16 2003  Richard Kenner  <kenner at vlsi1 dot ultra dot nyu dot edu>

	* stor-layout.c (layout_decl): Don't set DECL_SIZE_UNIT if already set.

*** gcc/stor-layout.c	16 Apr 2003 21:33:19 -0000	1.151
--- gcc/stor-layout.c	18 Apr 2003 23:04:56 -0000
*************** layout_decl (decl, known_align)
*** 420,424 ****
        DECL_SIZE_UNIT (decl) = TYPE_SIZE_UNIT (type);
      }
!   else
      DECL_SIZE_UNIT (decl)
        = convert (sizetype, size_binop (CEIL_DIV_EXPR, DECL_SIZE (decl),
--- 420,424 ----
        DECL_SIZE_UNIT (decl) = TYPE_SIZE_UNIT (type);
      }
!   else if (DECL_SIZE_UNIT (decl) == 0)
      DECL_SIZE_UNIT (decl)
        = convert (sizetype, size_binop (CEIL_DIV_EXPR, DECL_SIZE (decl),


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