public inbox for java@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Fix PR64044
@ 2014-11-24 12:36 Richard Biener
  2014-11-24 12:46 ` Andrew Haley
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Biener @ 2014-11-24 12:36 UTC (permalink / raw)
  To: gcc-patches; +Cc: java


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?

Thanks,
Richard.

2014-11-24  Richard Biener  <rguenther@suse.de>

	PR java/64004
	* class.c (build_classdollar_field): Do not set TREE_READONLY.

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;

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-11-24 12:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-24 12:36 [PATCH] Fix PR64044 Richard Biener
2014-11-24 12:46 ` Andrew Haley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).