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: your change to tree-sra.c


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.


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