This is the mail archive of the
java-prs@sourceware.cygnus.com
mailing list for the Java project.
Re: gcj/272: gcj -c breaks class initialization
- To: apbianco at cygnus dot com
- Subject: Re: gcj/272: gcj -c breaks class initialization
- From: Alexandre Petit-Bianco <apbianco at cygnus dot com>
- Date: 2 Jul 2000 05:20:00 -0000
- Cc: java-prs at sourceware dot cygnus dot com,
- Reply-To: Alexandre Petit-Bianco <apbianco at cygnus dot com>
The following reply was made to PR gcj/272; it has been noted by GNATS.
From: Alexandre Petit-Bianco <apbianco@cygnus.com>
To: osk@hem.passagen.se
Cc: java-gnats@sourceware.cygnus.com
Subject: Re: gcj/272: gcj -c breaks class initialization
Date: Sat, 1 Jul 2000 22:18:45 -0700 (PDT)
osk@hem.passagen.se writes:
> Test.java: In method `<clinit>()':
> Test.java:0: verification error at PC=0
> Test.java:0: PC not at instruction start
This is a regression because of a modification made to fix a problem
unraveled by ENABLE_TREE_CHECKING:
http://gcc.gnu.org/ml/gcc-patches/2000-06/msg00737.html
Here's a fix.
./A
2000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (maybe_generate_pre_expand_clinit): Don't build a
debugable statement with empty_stmt_node.
Index: parse.y
===================================================================
RCS file: /cvs/gcc/egcs/gcc/java/parse.y,v
retrieving revision 1.188
diff -u -p -r1.188 parse.y
--- parse.y 2000/06/30 02:22:15 1.188
+++ parse.y 2000/07/02 05:06:26
@@ -7461,7 +7461,7 @@ maybe_generate_pre_expand_clinit (class_
/* We build the assignment expression that will initialize the
field to its value. There are strict rules on static
initializers (8.5). FIXME */
- if (TREE_CODE (stmt) != BLOCK)
+ if (TREE_CODE (stmt) != BLOCK && stmt != empty_stmt_node)
stmt = build_debugable_stmt (EXPR_WFL_LINECOL (stmt), stmt);
java_method_add_stmt (mdecl, stmt);
}