Message ID | alpine.LSU.2.11.1411241324470.374@zhemvz.fhfr.qr |
---|---|
State | New |
Headers | show |
On 11/24/2014 12:29 PM, Richard Biener wrote: > > The following fixes an issue I found when more aggressively > constant-folding from static initializers. The Java frontend > fails to provide an initializer for the classdollar field > it creates but nevertheless marks them with TREE_READONLY > whilst being static. > > Thus the following patch removes setting of TREE_READONLY. > > Bootstrap & regtest running on x86_64-unknown-linux-gnu. > > Ok? OK, thanks. Andrew.
Index: gcc/java/class.c =================================================================== --- gcc/java/class.c (revision 218010) +++ gcc/java/class.c (working copy) @@ -1085,7 +1085,6 @@ build_classdollar_field (tree type) TYPE_QUAL_CONST))); TREE_STATIC (decl) = 1; TREE_CONSTANT (decl) = 1; - TREE_READONLY (decl) = 1; TREE_PUBLIC (decl) = 1; java_hide_decl (decl); DECL_IGNORED_P (decl) = 1;