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: [lto][patch] remove local variables from types (after gimplification)


On Thu, Jun 26, 2008 at 1:28 AM, Bill Maddox <maddox@google.com> wrote:
> The following test segfaults, in tree.c (integer_onep):
>
>   FAIL: gcc.c-torture/compile/20071108-1.c  -O2 -flto  (internal
> compiler error)
>
> The problem is a call with a NULL argument on line 519 of tree-ssa-forwprop.c:
>
> 514       tree index;
> 515
> 516       /* Try to find an expression for a proper index.  This is either
> 517          a multiplication expression by the element size or just the
> 518          ssa name we came along in case the element size is one.  */
> 519       if (integer_onep (TYPE_SIZE_UNIT (TREE_TYPE (TREE_TYPE (def_rhs)))))
> 520         index = offset;
> 521       else
> 522         {
> 523           /* Get the offset's defining statement.  */
>
> It looks like we lose an optimization if we can't recognize a constant size.

Sure we will.  But we are not talking about NULL-ing non-constant sizes,
no?  Of course TYPE_SIZE{_UNIT} accessors might need a non-NULL
check in some places.

Richard.


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