This is the mail archive of the
mailing list for the GCC project.
Re: false assertion make_decl_rtl, at varasm.c:1273
- From: Ian Lance Taylor <iant at google dot com>
- To: Kouadri MostÃfaoui Abdellah Medjadji <abdellah dot kouadri_mostefaoui at it-sudparis dot eu>
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 22 May 2009 11:04:42 -0700
- Subject: Re: false assertion make_decl_rtl, at varasm.c:1273
- References: <firstname.lastname@example.org>
Kouadri MostÃfaoui Abdellah Medjadji
> I'm working on a new transformation pass.
> During this pass the whole TREE of a function is parsed using tree
> walker, and code is inserted (using BIND_EXPRs).
> The problem is that i'm having a false assertion
> "at make_decl_rtl, at varasm.c:1273"
> This is the line NÂ1273 of varasm.c
> gcc_assert (TREE_CODE (decl) != VAR_DECL
> || TREE_STATIC (decl)
> || TREE_PUBLIC (decl)
> || DECL_EXTERNAL (decl)
> || DECL_REGISTER (decl));
> The problem appears only when transformations are made in functions
> different than main(). Also, the assertion fails when make_decl_rtl is
> called with local variables already declared in the function (and not
> artificial variables itroduced by the pass).
> Can some one help me to figure out what this function stands for? and
> how i can solve my problem ?
make_decl_rtl is used to generate the RTL to refer to some static
object. It should not be called for a local variable; a local variable
should be turned into a pseudo-register instead. It's hard to know what
is wrong with your pass; you should look at what is calling
make_decl_rtl with a local variable, any why.