This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: your change to tree-sra.c
- From: Diego Novillo <dnovillo at redhat dot com>
- To: Richard Kenner <kenner at vlsi1 dot ultra dot nyu dot edu>
- Cc: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Wed, 07 Jul 2004 12:24:00 -0400
- Subject: Re: your change to tree-sra.c
- Organization: Red Hat Canada
- References: <10407071525.AA06094@vlsi1.ultra.nyu.edu>
On Wed, 2004-07-07 at 11:25, Richard Kenner wrote:
> I care only if it's a GIMPLE constant. In SRA, we care that it be
> GIMPLE code, so ERROR_MARK will not work. But I'm missing something, if
> you have already expanded the initializer in the IL, why does it matter
> that DECL_INITIAL is NULL?
>
> Look at the code in tree-sra.c. It's saying that if DECL_INITIAL
> of a static VAR_DECL is zero, then you can use a value of zero instead
> of looking at the value of the decl. And that's wrong.
>
Aha, I see now. Perhaps we should have either a langhook or some other
bit that marks the _DECL as being initialized in the IL. I agree that
the semantics of a read-only static and CONSTRUCTOR are C-like here. To
me this is best represented with a langhook, but FE issues are not my
forte.
Diego.