Bug 20362 - ICE: bus error if missed interface used in abstract class and output file specified
Summary: ICE: bus error if missed interface used in abstract class and output file spe...
Status: RESOLVED WORKSFORME
Alias: None
Product: gcc
Classification: Unclassified
Component: java (show other bugs)
Version: 3.4.3
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-07 17:05 UTC by Bojan Antonovic
Modified: 2005-07-23 22:49 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
source code in tbz. (287 bytes, application/octet-stream)
2005-03-07 17:06 UTC, Bojan Antonovic
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bojan Antonovic 2005-03-07 17:05:31 UTC
Class C is abstract and implements interface I. Class Bugtest has main() and
imports C. All are in a different package hierarchy levels (see code).

crashing:
gcj -o bugtest --main=BugTest *.class */*.class

working:
gcj -o bugtest --main=BugTest *.class
gcj -o bugtest --main=BugTest *.class */*.class */*/*.class
gcj --main=BugTest *.class
gcj --main=BugTest *.class */*.class */*/*.class

correctly complaining:
gcj --main=BugTest *.class */*.class
/usr/bin/ld: Undefined symbols:
foo::deepfoo::I::class$
collect2: ld returned 1 exit status

source codes:

1. I.java:
package foo.deepfoo;

public interface I {
}

2. C.java:
package foo;

import foo.deepfoo.I;

public abstract class C implements I {

}

3. import foo.C;   

public class BugTest {

    public static void main (String args[]) {
    }
}
Comment 1 Bojan Antonovic 2005-03-07 17:06:10 UTC
Created attachment 8351 [details]
source code in tbz.
Comment 2 Bojan Antonovic 2005-03-07 17:11:45 UTC
*** Bug 18212 has been marked as a duplicate of this bug. ***
Comment 3 Bojan Antonovic 2005-03-07 19:21:43 UTC
Compiling the .java files directly works:

working:
gcj -o bugtest --main=BugTest *.java */*.java
gcj --main=BugTest *.java */*.java */*/*.java

Compiling the code by gcj -C first instead with javac makes no difference.
Comment 4 Ranjit Mathew 2005-03-08 10:05:31 UTC
As of 2005-03-08, this testcase works quite fine for me with mainline CVS.
Comment 5 Ranjit Mathew 2005-03-09 10:55:47 UTC
I do not see an ICE with the given testcase as of 2005-03-09 and mainline CVS.