This is the mail archive of the gcc-patches@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: [lto] PATCH: Add support for referencing types from function bodies


On Mon, 2006-09-04 at 10:51 -0700, Mark Mitchell wrote:
> 
> I think Fortran and Objective-C should change, and that they may need to 
> change in order to work with LTO.  I think that, as in C/C++, a VAR_DECL 
> with TREE_READONLY should be used instead, and that CONST_DECLs should 
> never be addressable.

Why?  The reason why it was done was to save space and make sure they
are really put in the constant section.  I don't see a reason why they
should be using VAR_DECLs.  The use of CONST_DECLs in the Fortran
front-end was added by RTH[1].
Really having a VAR_DECL with TREE_READONLY set is incorrect as it is
not really readonly.  Anyways you with the var_decls like that you don't
get the constant pool from the middle-end like you would get from
CONST_DECLs which is really needed for Fortran code.

Thanks,
Andrew Pinski


[1] http://gcc.gnu.org/ml/fortran/2004-07/msg00248.html


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