diff options
author | Alexandre Petit-Bianco <apbianco@redhat.com> | 2001-09-07 11:30:29 -0700 |
---|---|---|
committer | Alexandre Petit-Bianco <apbianco@gcc.gnu.org> | 2001-09-07 11:30:29 -0700 |
commit | 731866ba53c49d2633c2d298a71462dbbd7f356b (patch) | |
tree | 8098278e0ae77ece871e4167b796a3e9826f8024 /gcc/java/jcf-write.c | |
parent | 9b3bd4249d2e0e46d4bec0909e626543bbd14d3b (diff) | |
download | gcc-731866ba53c49d2633c2d298a71462dbbd7f356b.zip gcc-731866ba53c49d2633c2d298a71462dbbd7f356b.tar.gz gcc-731866ba53c49d2633c2d298a71462dbbd7f356b.tar.bz2 |
re PR java/4230 (gcj -C segfaults on static string continuation '+' in gcj 3.1 expermental.)
2001-09-05 Alexandre Petit-Bianco <apbianco@redhat.com>
* jcf-write.c (generate_classfile): Issue an error in case of
field/initial value mismatch.
* parse.y (analyze_clinit_body): Keep <clinit> if an array is
being initialized and we're generating bytecode.
(java_complete_lhs): In MODIFY_EXPR section: added comments,
set DECL_INITIAL properly when appropriate.
Fixes PR java/4230
Fixes PR java/4204
(http://gcc.gnu.org/ml/gcc-patches/2001-09/msg00247.html )
From-SVN: r45474
Diffstat (limited to 'gcc/java/jcf-write.c')
-rw-r--r-- | gcc/java/jcf-write.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/java/jcf-write.c b/gcc/java/jcf-write.c index 026ceb5..44c676f 100644 --- a/gcc/java/jcf-write.c +++ b/gcc/java/jcf-write.c @@ -2899,8 +2899,8 @@ generate_classfile (clas, state) { tree init = DECL_INITIAL (part); static tree ConstantValue_node = NULL_TREE; - // This conversion is a work-around for front-end bug. - init = convert (TREE_TYPE (part), init); + if (TREE_TYPE (part) != TREE_TYPE (init)) + fatal_error ("field initializer type mismatch."); ptr = append_chunk (NULL, 8, state); if (ConstantValue_node == NULL_TREE) ConstantValue_node = get_identifier ("ConstantValue"); |