gcj/37
Alexandre Petit-Bianco
apbianco@cygnus.com
Wed Oct 20 02:00:00 GMT 1999
The following reply was made to PR gcj/37; it has been noted by GNATS.
From: Alexandre Petit-Bianco <apbianco@cygnus.com>
To: bryce@albatross.co.nz, green@cygnus.com
Cc: java-gnats@sourceware.cygnus.com
Subject: Re: gcj/37
Date: Wed, 20 Oct 1999 01:53:16 -0700 (PDT)
apbianco@cygnus.com writes:
> Note: I can get my current egcs tree on a Debian box to compile
> and link it correctly with the -O2 flag. I can also reproduce
> the -O3 SEGV problem on two files: `EmFloatPnt.java' and
> `NeuralNetTest.java'. I'll have a look at it.
Bryce, can you try the following patch on a fairly recent gcj source
tree, if you have one. Like, one that fixes the qualified expression
problems people reported this summer but still builds. I can't test
this patch right now, the source tree seems to be completely broken --
at least for my Debian box: `genattr' and/or the matching `md' file
seem to have gone completely south.
./A
Wed Oct 20 01:41:47 1999 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (java_complete_tree): fold_constant_for_init to work
on permanent_obstack.
(java_complete_lhs): Likewise.
Index: parse.y
===================================================================
RCS file: /cvs/gcc/egcs/gcc/java/parse.y,v
retrieving revision 1.112
diff -u -p -r1.112 parse.y
--- parse.y 1999/10/14 17:13:56 1.112
+++ parse.y 1999/10/20 08:42:31
@@ -8028,7 +8028,9 @@ java_complete_tree (node)
{
tree value = DECL_INITIAL (node);
DECL_INITIAL (node) = NULL_TREE;
+ push_obstacks (&permanent_obstack, &permanent_obstack);
value = fold_constant_for_init (value, node);
+ pop_obstacks ();
DECL_INITIAL (node) = value;
if (value != NULL_TREE)
return value;
@@ -8230,8 +8232,12 @@ java_complete_lhs (node)
&& JDECL_P (TREE_OPERAND (cn, 1))
&& FIELD_FINAL (TREE_OPERAND (cn, 1))
&& DECL_INITIAL (TREE_OPERAND (cn, 1)))
- cn = fold_constant_for_init (DECL_INITIAL (TREE_OPERAND (cn, 1)),
- TREE_OPERAND (cn, 1));
+ {
+ push_obstacks (&permanent_obstack, &permanent_obstack);
+ cn = fold_constant_for_init (DECL_INITIAL (TREE_OPERAND (cn, 1)),
+ TREE_OPERAND (cn, 1));
+ pop_obstack ();
+ }
if (!TREE_CONSTANT (cn) && !flag_emit_xref)
{
@@ -8484,7 +8490,11 @@ java_complete_lhs (node)
&& TREE_CODE (nn) == VAR_DECL && TREE_STATIC (nn)
&& DECL_INITIAL (nn) != NULL_TREE)
{
- tree value = fold_constant_for_init (nn, nn);
+ tree value;
+
+ push_obstacks (&permanent_obstack, &permanent_obstack);
+ value = fold_constant_for_init (nn, nn);
+ pop_obstack ();
if (value != NULL_TREE)
{
tree type = TREE_TYPE (value);
More information about the Java-prs
mailing list