[lto] PATCH: Add support for referencing types from function bodies

Andrew Pinski pinskia@physics.uc.edu
Mon Sep 4 18:03:00 GMT 2006


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



More information about the Gcc-patches mailing list