[PATCH]: Remove staticp langhook

Daniel Berlin dberlin@dberlin.org
Sat Apr 7 22:39:00 GMT 2007


On 4/7/07, Andreas Schwab <schwab@suse.de> wrote:
> "Daniel Berlin" <dberlin@dberlin.org> writes:
>
> > This langhook is a remnant from a time when expand had to handle all
> > the frontend specific trees.
> > This is no longer the case, and as such, all the implementations of
> > this are dead code.
> >
> > I have added asserts in place of the langhook use on the off chance
> > someone out-of-tree is trying to still throw lang-specific trees at
> > expand.
>
> Apparently the Ada frontend doesn't behave.
>
> +===========================GNAT BUG DETECTED==============================+
> | 4.3.0 20070407 (experimental) (ia64-suse-linux-gnu) GCC error:           |
> | in staticp, at tree.c:2017                                               |
> | Error detected around ../../gcc/ada/memtrack.adb:163                     |
>

Sorry, I don't have a machine that builds Ada right now (darwin).
The Ada frontend didn't implement this langhook, so it would have
always gotten NULL on any non-lowered tree.
I don't know why they are trying to use staticp, it looks like they
are effectively trying to get the same result that TREE_STATIC (arg)
|| (DECL_P (arg) && DECL_EXTERNAL), but i'm not positive.
They never actually use the result it returns, just check it for
whether it is NULL.

In any case, if you simply remove the assert, the Ada frontend will
get the result it used to, since again, it didn't implement this
langhook.



More information about the Gcc-patches mailing list