public inbox for
 help / color / mirror / Atom feed
From: Richard Biener <>
Subject: [PATCH] Fix PR64044
Date: Mon, 24 Nov 2014 12:36:00 -0000	[thread overview]
Message-ID: <alpine.LSU.2.11.1411241324470.374@zhemvz.fhfr.qr> (raw)

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.



2014-11-24  Richard Biener  <>

	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)
       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;

             reply	other threads:[~2014-11-24 12:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-24 12:36 Richard Biener [this message]
2014-11-24 12:46 ` Andrew Haley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LSU.2.11.1411241324470.374@zhemvz.fhfr.qr \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).