/* The following code causes gcj-3.3.1 to segfault. * * Two overloaded methods with the same name, each containing an inner * class with the same name. $ cat /etc/redhat-release Raw Hide 20030906 $ rpm -q gcc-java gcc-java-3.3.1-3 $ gcj --version gcj (GCC) 3.3.1 20030903 (Red Hat Linux 3.3.1-3) Copyright (C) 2003 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ gcj -C E.java E.java: In class `S.E': E.java: In method `S.E.C()': E.java:13: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://bugzilla.redhat.com/bugzilla> for instructions. */ package S; class E { void C () { class I { }; new I(); } void C (final int J) { class I { }; } }
Also fails with current cvs head
Here is the backtrace: 0x0807fca5 in patch_method_invocation (patch=0x4004c340, primary=0x0, where=0x0, from_super=1, is_static=0x0, ret_decl=0xbffebe98) at parse.y:10752 10752 if (JPRIMITIVE_TYPE_P (TREE_TYPE (TREE_VALUE (ta))) && (gdb) bt #0 0x0807fca5 in patch_method_invocation (patch=0x4004c340, primary=0x0, where= 0x0, from_super=1, is_static=0x0, ret_decl=0xbffebe98) at parse.y:10752 #1 0x08072c54 in java_complete_lhs (node=0x4004c340) at parse.y:11906 #2 0x0807d17c in java_complete_tree (node=0x4004c340) at parse.y:11424 #3 0x08072659 in java_complete_lhs (node=0x4004c360) at parse.y:11822 #4 0x0807d17c in java_complete_tree (node=0x400c3384) at parse.y:11424 #5 0x08077221 in java_complete_lhs (node=0x400c3370) at parse.y:11545 #6 0x0807d17c in java_complete_tree (node=0x0) at parse.y:11424 #7 0x0807d3e7 in java_complete_expand_method (mdecl=0x400c1a20) at parse.y:8046 #8 0x0807dfaf in java_complete_expand_class (outer=0x400c1804) at parse.y:7761 #9 0x0807e9bc in java_expand_classes () at parse.y:7662 #10 0x080bb5a3 in java_parse_file (set_yydebug=0) at /home/gates/pinskia/src/gnu/gcc/ src/gcc/java/jcf-parse.c:1112 #11 0x082f68fd in toplev_main (argc=1, argv=0xbffec5a3) at /home/gates/pinskia/src/ gnu/gcc/src/gcc/toplev.c:1804 #12 0x080d250e in main (argc=1, argv=0x1) at /home/gates/pinskia/src/gnu/gcc/src/gcc/ main.c:35
Xref: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=191211
All gcj front end bugs have been fixed by the gcj-eclipse branch merge. I'm mass-closing the affected PRs. If you believe one of these was closed in error, please reopen it with a note explaining why. Thanks.