internal error while compiling java/io/FilePermission.java whith -O /home/thomas/gnu/gcc-3.1.1/gcc/gcj -B/home/thomas/gnu/gcc-3.1.1/i686-pc-linux-gnu/libjava/ -B/home/thomas/gnu/gcc-3.1.1/gcc/ --encoding=UTF-8 -C -g1 -O -march=athlon -classpath '' -bootclasspath /home/thomas/gnu/gcc-3.1.1/i686-pc-linux-gnu/libjava:. \ -d /home/thomas/gnu/gcc-3.1.1/i686-pc-linux-gnu/libjava java/io/FilePermission.java java/io/FilePermission.java: In class `java.io.FilePermission': java/io/FilePermission.java: In method `java.io.FilePermission.equals(java.lang.Object)': java/io/FilePermission.java:153: internal error in generate_bytecode_insn - tree code not implemented: bit_field_ref java/io/FilePermission.java:153: internal error in generate_bytecode_insn - tree code not implemented: bit_field_ref java/io/FilePermission.java:153: confused by earlier errors, bailing out Release: 3.1.1 Environment: System: Linux pc61 2.4.17 #1 Mon Jan 28 12:18:28 MET 2002 i686 unknown Architecture: i686 host: i686-pc-linux-gnu build: i686-pc-linux-gnu target: i686-pc-linux-gnu configured with: ./configure : ./configure --enable-shared --enable-threads --with-cpu=athlon --enable-languages=c,c++,java --with-system-zlib How-To-Repeat: set JCFLAGS = -g1 -O -march=athlon in gcc-3.1.1/i686-pc-linux-gnu/libjava/Makefile
Fix: don't optimize
From: Tom Tromey <tromey@redhat.com> To: Thomas Greve <tgreve@pc61.ixmid.com> Cc: gcc-gnats@gcc.gnu.org Subject: Re: java/7611: Internal error while compiling libjava with -O Date: 16 Aug 2002 15:55:43 -0600 >>>>> "Thomas" == Thomas Greve <tgreve@pc61.ixmid.com> writes: Thomas> java/io/FilePermission.java:153: internal error in generate_bytecode_insn - tree code not implemented: bit_field_ref The problem here is that gcc will sometimes change a field access into a bit-field access. This happens in the tree-simplification routines (offhand I forget exactly where, but I think there is another PR on this topic). The bytecode back end doesn't understand bit fields, and changing this would be difficult. I'm surprised to see this happen on x86. Previously I believe it was only a problem on the alpha. Try building without -O (the .class files are all that matter). That might help. I once started a patch to add a lang-hook to let `gcj -C' disable this particular optimization. I still have it lying around somewhere but I haven't found the time to test it on my alpha box yet :-( Tom
Responsible-Changed-From-To: unassigned->tromey Responsible-Changed-Why: I'm handling this
State-Changed-From-To: open->closed State-Changed-Why: I checked in a fix for this. If you can try it, please do so and report back. I'm marking this PR as closed; we can reopen it if the problem persists. However, I think it will not.
From: tromey@gcc.gnu.org To: gcc-gnats@gcc.gnu.org Cc: Subject: java/7611 Date: 22 Aug 2002 00:41:29 -0000 CVSROOT: /cvs/gcc Module name: gcc Changes by: tromey@gcc.gnu.org 2002-08-21 17:41:29 Modified files: gcc/java : ChangeLog lang.c Log message: For PR java/6005 and PR java/7611: * lang.c (LANG_HOOKS_CAN_USE_BITFIELDS_P): New define. (java_can_use_bit_fields_p): New function. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/java/ChangeLog.diff?cvsroot=gcc&r1=1.1041&r2=1.1042 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/java/lang.c.diff?cvsroot=gcc&r1=1.106&r2=1.107
From: tromey@gcc.gnu.org To: gcc-gnats@gcc.gnu.org Cc: Subject: java/7611 Date: 22 Aug 2002 00:42:40 -0000 CVSROOT: /cvs/gcc Module name: gcc Changes by: tromey@gcc.gnu.org 2002-08-21 17:42:40 Modified files: gcc : ChangeLog fold-const.c langhooks-def.h langhooks.c langhooks.h Log message: For PR java/6005 and PR java/7611: * fold-const.c (fold_truthop): Use can_use_bit_fields_p. (fold): Likewise. * langhooks.c (lhd_can_use_bit_fields_p): New function. * langhooks-def.h (lhd_can_use_bit_fields_p): Declare. (LANG_HOOKS_CAN_USE_BIT_FIELDS_P): New define. (LANG_HOOKS_INITIALIZER): Use it. * langhooks.h (struct lang_hooks) [can_use_bit_fields_p]: New field. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=1.15228&r2=1.15229 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fold-const.c.diff?cvsroot=gcc&r1=1.218&r2=1.219 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/langhooks-def.h.diff?cvsroot=gcc&r1=1.36&r2=1.37 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/langhooks.c.diff?cvsroot=gcc&r1=1.32&r2=1.33 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/langhooks.h.diff?cvsroot=gcc&r1=1.44&r2=1.45
From: jakub@gcc.gnu.org To: gcc-gnats@gcc.gnu.org Cc: Subject: java/7611 Date: 16 Oct 2002 21:26:49 -0000 CVSROOT: /cvs/gcc Module name: egcs Branch: gcc-3_2-rhl8-branch Changes by: jakub@gcc.gnu.org 2002-10-16 14:26:48 Modified files: gcc : ChangeLog expr.c langhooks-def.h langhooks.h langhooks.c fold-const.c Makefile.in gcc/java : ChangeLog parse.y lang.c lex.c jcf-write.c expr.c except.c verify.c jcf-dump.c libjava/testsuite/libjava.lang: Array_3.java libjava/testsuite: ChangeLog Added files: libjava/testsuite/libjava.compile: narrow_case.java zeroexp.java libjava/testsuite/libjava.lang: EvaluationOrder.java EvaluationOrder.out utf8concat.java Log message: gcc/ 2002-10-16 Jakub Jelinek <jakub@redhat.com> * fold-const.c: Include langhooks.h. * Makefile.in (fold-const.o): Depend on langhooks.h. 2002-08-21 Tom Tromey <tromey@redhat.com> For PR java/6005 and PR java/7611: * fold-const.c (fold_truthop): Use can_use_bit_fields_p. (fold): Likewise. * langhooks.c (lhd_can_use_bit_fields_p): New function. * langhooks-def.h (lhd_can_use_bit_fields_p): Declare. (LANG_HOOKS_CAN_USE_BIT_FIELDS_P): New define. (LANG_HOOKS_INITIALIZER): Use it. * langhooks.h (struct lang_hooks) [can_use_bit_fields_p]: New field. 2002-07-24 Richard Henderson <rth@redhat.com> * expr.c (expand_expr) [TRY_FINALLY_EXPR]: Use GOTO_SUBROUTINE_EXPR form when not optimizing. 2002-07-21 Richard Henderson <rth@redhat.com> * expr.c (expand_expr) [TRY_FINALLY_EXPR]: Don't use GOTO_SUBROUTINE_EXPR when finally_block can be re-expanded. gcc/java/ 2002-10-15 Andrew Haley <aph@redhat.com> * parse.y (patch_invoke): Call force_evaluation_order on a static arg list. (resolve_qualified_expression_name): Call force_evaluation_order on a arg list that is part of a Qualified Expression Name. 2002-10-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * parse.y (merge_string_cste): Add parentheses around & within |. 2002-10-08 Tom Tromey <tromey@redhat.com> * parse.y (variable_declarator_id): Simplify error path for array declarator error. For PR java/8003. 2002-10-07 Anthony Green <green@redhat.com> * parse.y (merge_string_cste): Fix bug in string concatenation. 2002-10-01 Nathan Sidwell <nathan@codesourcery.com> * jcf-dump.c (print_constant, case CONSTANT_float): Don't fall foul of type-based aliasing. 2002-09-26 Andrew Haley <aph@redhat.com> * expr.c (build_java_array_length_access): Check for null pointer. * expr.c (expand_java_arrayload): Likewise. 2002-09-17 Tom Tromey <tromey@redhat.com> * lex.c (java_read_unicode_collapsing_terminators): Handle case where \r appears at EOF. Fixes PR java/7950. 2002-09-11 Per Bothner <per@bothner.com> * parse.y (fold_constant_for_init): If a VAR_DECL, convert numerical constant to the type of the field. (java_complete_tree): Remove now-redundant code. * parse.y (fold_constant_for_init): 'null' is not a constant expr. 2002-09-03 Jesse Rosenstock <jmr@ugcs.caltech.edu> For PR java/5794: * verify.c (verify_jvm_instructions) [OPCODE_jsr]: Only push the return label if a ret instruction for the jsr has been reached. 2002-08-28 Andrew Haley <aph@redhat.com> * verify.c (verify_jvm_instructions): Allow exception handler inside code that is being protected, but generate a warning. * except.c (link_handler): Initialize `expanded' in new eh_range. (binding_depth, is_class_level, current_pc): Declare extern. 2002-08-26 Tom Tromey <tromey@redhat.com> * parse.y (try_builtin_assignconv): Allow narrowing primitive conversion if RHS_TYPE is byte, short, or char. 2002-08-21 Tom Tromey <tromey@redhat.com> For PR java/6005 and PR java/7611: * lang.c (LANG_HOOKS_CAN_USE_BITFIELDS_P): New define. (java_can_use_bit_fields_p): New function. 2002-08-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz> * jcf-write.c (get_access_flags): Return correct access flags for private and protected inner classes. 2002-07-22 Tom Tromey <tromey@redhat.com> * lex.c (java_lex): Check for `e' or `E' after 0. 2002-07-21 Richard Henderson <rth@redhat.com> * lang.c (java_unsafe_for_reeval): New. (LANG_HOOKS_UNSAFE_FOR_REEVAL): New. 2002-07-01 Tom Tromey <tromey@redhat.com> For PR libgcj/7073: * parse.y (patch_incomplete_class_ref): Handle VOID_TYPE specially. libjava/testsuite/ 2002-10-15 Andrew Haley <aph@redhat.com> * libjava.lang/EvaluationOrder.java (EvaluationOrder): New. * libjava.lang/EvaluationOrder.out (EvaluationOrder): New. 2002-10-03 Andrew Haley <aph@redhat.com> * libjava.lang/Array_3.java (baz): New. (main): Call baz. 2002-09-29 Anthony Green <green@redhat.com> * libjava.lang/utf8concat.java: New file. * libjava.lang/utf8concat.out: Ditto. 2002-08-26 Tom Tromey <tromey@redhat.com> * libjava.compile/narrow_case.java: New file. 2002-07-22 Tom Tromey <tromey@redhat.com> * libjava.compile/zeroexp.java: New file. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/egcs/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_2-rhl8-branch&r1=1.13152.2.657.2.27.2.21&r2=1.13152.2.657.2.27.2.22 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/egcs/gcc/expr.c.diff?cvsroot=gcc&only_with_tag=gcc-3_2-rhl8-branch&r1=1.423.2.19.4.1.2.3&r2=1.423.2.19.4.1.2.4 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/egcs/gcc/langhooks-def.h.diff?cvsroot=gcc&only_with_tag=gcc-3_2-rhl8-branch&r1=1.8.10.2.2.1.2.2&r2=1.8.10.2.2.1.2.3 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/egcs/gcc/langhooks.h.diff?cvsroot=gcc&only_with_tag=gcc-3_2-rhl8-branch&r1=1.15.8.2.2.1.2.2&r2=1.15.8.2.2.1.2.3 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/egcs/gcc/langhooks.c.diff?cvsroot=gcc&only_with_tag=gcc-3_2-rhl8-branch&r1=1.16.2.2.4.1.2.2&r2=1.16.2.2.4.1.2.3 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/egcs/gcc/fold-const.c.diff?cvsroot=gcc&only_with_tag=gcc-3_2-rhl8-branch&r1=1.185.2.4.4.1&r2=1.185.2.4.4.2 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/egcs/gcc/Makefile.in.diff?cvsroot=gcc&only_with_tag=gcc-3_2-rhl8-branch&r1=1.830.2.15.4.3&r2=1.830.2.15.4.4 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/egcs/gcc/java/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_2-rhl8-branch&r1=1.925.2.59.2.2.2.2&r2=1.925.2.59.2.2.2.3 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/egcs/gcc/java/parse.y.diff?cvsroot=gcc&only_with_tag=gcc-3_2-rhl8-branch&r1=1.353.2.19&r2=1.353.2.19.4.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/egcs/gcc/java/lang.c.diff?cvsroot=gcc&only_with_tag=gcc-3_2-rhl8-branch&r1=1.85.2.4.4.2&r2=1.85.2.4.4.3 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/egcs/gcc/java/lex.c.diff?cvsroot=gcc&only_with_tag=gcc-3_2-rhl8-branch&r1=1.80.8.4&r2=1.80.8.4.8.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/egcs/gcc/java/jcf-write.c.diff?cvsroot=gcc&only_with_tag=gcc-3_2-rhl8-branch&r1=1.99.2.4&r2=1.99.2.4.4.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/egcs/gcc/java/expr.c.diff?cvsroot=gcc&only_with_tag=gcc-3_2-rhl8-branch&r1=1.132.2.10&r2=1.132.2.10.4.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/egcs/gcc/java/except.c.diff?cvsroot=gcc&only_with_tag=gcc-3_2-rhl8-branch&r1=1.26.20.1&r2=1.26.20.1.8.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/egcs/gcc/java/verify.c.diff?cvsroot=gcc&only_with_tag=gcc-3_2-rhl8-branch&r1=1.47&r2=1.47.14.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/egcs/gcc/java/jcf-dump.c.diff?cvsroot=gcc&only_with_tag=gcc-3_2-rhl8-branch&r1=1.42.2.2&r2=1.42.2.2.8.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/egcs/libjava/testsuite/libjava.compile/narrow_case.java.diff?cvsroot=gcc&only_with_tag=gcc-3_2-rhl8-branch&r1=NONE&r2=1.1.16.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/egcs/libjava/testsuite/libjava.compile/zeroexp.java.diff?cvsroot=gcc&only_with_tag=gcc-3_2-rhl8-branch&r1=NONE&r2=1.1.18.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/egcs/libjava/testsuite/libjava.lang/EvaluationOrder.java.diff?cvsroot=gcc&only_with_tag=gcc-3_2-rhl8-branch&r1=NONE&r2=1.1.2.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/egcs/libjava/testsuite/libjava.lang/EvaluationOrder.out.diff?cvsroot=gcc&only_with_tag=gcc-3_2-rhl8-branch&r1=NONE&r2=1.1.2.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/egcs/libjava/testsuite/libjava.lang/utf8concat.java.diff?cvsroot=gcc&only_with_tag=gcc-3_2-rhl8-branch&r1=NONE&r2=1.1.10.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/egcs/libjava/testsuite/libjava.lang/Array_3.java.diff?cvsroot=gcc&only_with_tag=gcc-3_2-rhl8-branch&r1=1.1&r2=1.1.26.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/egcs/libjava/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_2-rhl8-branch&r1=1.177.2.24.2.2&r2=1.177.2.24.2.2.2.1