This is the mail archive of the gcc@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: false assertion make_decl_rtl, at varasm.c:1273


Kouadri MostÃfaoui Abdellah Medjadji
<abdellah.kouadri_mostefaoui@it-sudparis.eu> writes:

> 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.

Ian


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