From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Received: (qmail 25719 invoked by uid 71); 12 Jan 2003 00:56:00 -0000 Resent-Date: 12 Jan 2003 00:56:00 -0000 Resent-Message-ID: <20030112005600.25718.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org, java-prs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, atomb@cats.ucsc.edu Received: (qmail 21827 invoked by uid 61); 12 Jan 2003 00:47:18 -0000 Message-Id: <20030112004718.21826.qmail@sources.redhat.com> Date: Sun, 12 Jan 2003 00:56:00 -0000 From: atomb@cats.ucsc.edu Reply-To: atomb@cats.ucsc.edu To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: java/9277: gcj fails with complex inner classes and exceptions X-SW-Source: 2003-01/txt/msg00754.txt.bz2 List-Id: >Number: 9277 >Category: java >Synopsis: gcj fails with complex inner classes and exceptions >Confidential: no >Severity: non-critical >Priority: low >Responsible: unassigned >State: open >Class: rejects-legal >Submitter-Id: net >Arrival-Date: Sat Jan 11 16:56:00 PST 2003 >Closed-Date: >Last-Modified: >Originator: atomb@cats.ucsc.edu >Release: unknown-1.0 >Organization: >Environment: Debian unstable, Intel. gcc version 3.2.2 20030109 (Debian prerelease) But affects official releases, as well, with exactly the same behavior. >Description: I get the following error: # gcj-3.2 -c Outer1.java ./Outer1.java:1: Class `Outer1' already defined in Outer1.java:1. class Outer1 extends Base { ^ ./Outer1.java:2: confused by earlier errors, bailing out When compiling this simplified set of files: Base.java: class Base { } First.java: class First { Outer2 foo; static class Error extends RuntimeException { Error(String message) { } } } Outer1.java: class Outer1 extends Base { static class Inner1 extends Outer1 { void func() { throw new First.Error("blah"); } } } Outer2.java: class Outer2 { class Inner2 extends Outer2 { Inner2(Outer1.Inner1 param) { } } } Removing just about any element of any of the files eliminates the error. However, I haven't managed to change the original source that these snippets were abstracted from so that it compiles and still has the same semantics. I have tried compling with today's (20030111) 3.4 CVS head, and it still breaks, but with a different message: Outer1.java:1: error: Superclass `Base' of class `Outer1' not found. class Outer1 extends Base { Base.java does exist, though, and this error occurs whether or not Base.o or Base.class exist. Both the Sun JDK 1.4 (Blackdown 1.4.0.99beta) and Jikes (Version 1.18 - 21 November 2002) compile the code with no complaints. >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted: