[ast-optimizer-branch]: Simplify STMT_EXPR's

Daniel Berlin dberlin@dberlin.org
Thu May 2 12:21:00 GMT 2002


On Thu, 2 May 2002, Sebastian Pop wrote:

> On Thu, May 02, 2002 at 12:54:37PM -0400, Daniel Berlin wrote:
> > 
> > The first portion gets transformed into:
> >           union tree_node * a;
> >                   {
> >                     union tree_node * __t = *(
> >                     {
> >                       union tree_node * __t = a2;
> >                       if (*__t.common.code != 2)
> >                         tree_check_failed (__t, 2, "../../gcc/tree.c", 
> > 2695, "merge_attributes");
> >                       __t;
> >                     }
> >                     ).list.purpose;
> >                     T.2721 = *__t.common.code;
> >                     T.2722 = T.2721 != 1;
> >                     if (T.2722 != 0)
> >                       {
> >                         T.2715 = "../../gcc/tree.c";
> >                         T.2716 = T.2715;
> >                         T.2717 = T.2716;
> >                         T.2718 = "merge_attributes";
> >                         T.2719 = T.2718;
> >                         T.2720 = T.2719;
> >                         tree_check_failed (__t, 1, T.2717, 2695, T.2720);
> >                       }
> >                     T.2723 = __t;
> >                   }
> >                   T.2724 = *T.2723.identifier.id.str;
> >                   a = lookup_attribute (T.2724, attributes);
> > 
> 
> Is there a declaration for T.2721 somewhere ?
Yeah.
It's function local, i omitted it.

> 
> 
> > (We don't try to simplify the initialization of __t here, because it's a 
> > readonly variable. That's why it's still a statement expr).
> > 
> > 
> > It's aborting trying to expand
> > 
> > T.2721 = *__t.common.code;
> > 
> > For some reason, the __t in that statement doesn't have RTL, associated 
> > with it (which is why it goes to make some), while I think the expression 
> > right above it should have just done that.
> > 
> I see the declaration of __t, but the DECL_STMT for the T2721, ...

It's the __t it aborts on.

> 
> > 
> > The above was printed with your pretty printer patch, as well as your 
> > suggestion just in case temp happens to be a scope_stmt somehow, 
> > incorporated.
> > 
> 



More information about the Gcc-patches mailing list