don't clear DECL_RTL of a DECL_REGISTER decl

Alexandre Oliva aoliva@redhat.com
Fri Jul 9 06:22:00 GMT 2004


On Jul  9, 2004, Geoffrey Keating <geoffk@geoffk.org> wrote:

> Richard Henderson <rth@redhat.com> writes:
>> On Thu, Jul 08, 2004 at 09:31:51PM -0300, Alexandre Oliva wrote:
>> > 	* toplev.c (check_global_declarations): Don't clear the DECL_RTL
>> > 	of a register variable.
>> 
>> I think you should set TREE_ASM_WRITTEN instead.  

> This code in make_decl_rtl already does that:

>   /* Do nothing for global register variables.  */
>   if (DECL_RTL_SET_P (decl) && REG_P (DECL_RTL (decl)))
>     {
>       TREE_ASM_WRITTEN (decl) = 1;
>       return;
>     }

> I wonder why it isn't/hasn't been called?

The revised patch I posted should make it clear.  The call to
assemble_variable was deferred because of the cgraph machinery.

-- 
Alexandre Oliva             http://www.ic.unicamp.br/~oliva/
Red Hat Compiler Engineer   aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist  oliva@{lsd.ic.unicamp.br, gnu.org}



More information about the Gcc-patches mailing list