public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug java/30844] New: invalid "Can't find method" error
@ 2007-02-18 21:03 rizzolo at gmail dot com
2007-02-18 21:07 ` [Bug java/30844] " rizzolo at gmail dot com
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: rizzolo at gmail dot com @ 2007-02-18 21:03 UTC (permalink / raw)
To: java-prs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2850 bytes --]
The following code, placed in a file named A.java, fails to compile with GCJ
4.1.0. Sun's javac has no problem with it. Interestingly, if you comment out
the line marked with "/**/", the code compiles.
/* Begin A.java */
public class A
{
public A() { }
public int foo(Object a) { return 1; }
public int foo(Object[] a) { return 1; }
public static class B extends A
{
public B() { }
/**/ public int foo(Object a) { return 1; }
}
public static class C extends B
{
public C() { }
public int foo(Object[] a) { return super.foo(a); }
}
}
/* End A.java */
The command I ran:
$ gcj4 -v -C A.java
Using built-in specs.
Target: i386-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--enable-checking=release --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --with-gxx-include-dir=/usr/include/c++/3.4.3
--enable-libgcj-multifile --enable-languages=c,c++,java,f95
--enable-java-awt=gtk --disable-dssi
--with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic
--host=i386-redhat-linux
Thread model: posix
gcc version 4.1.0 20060515 (Red Hat 4.1.0-18)
/usr/libexec/gcc/i386-redhat-linux/4.1.0/jc1 A.java -quiet -dumpbase A.java
-mtune=generic -auxbase-strip NONE -g1 -version -fsyntax-only
-femit-class-files -o A
GNU Java version 4.1.0 20060515 (Red Hat 4.1.0-18) (i386-redhat-linux)
compiled by GNU C version 4.1.0 20060515 (Red Hat 4.1.0-18).
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Class path starts here:
./
/home/rizzolo/lib/
/home/rizzolo/lib/java_cup.jar/ (zip)
/home/rizzolo/cogcomp/LBP/LBJ2/
/usr/share/java/libgcj-4.1.0.jar/ (system) (zip)
A.java: In class 'A$C':
A.java: In method 'A$C.foo(java.lang.Object[])':
A.java:18: error: Can't find method foo([Ljava/lang/Object;) in type A$B.
Candidates are:
'A$B.foo(java.lang.Object)' in 'A$B'
'A.foo(java.lang.Object[])' in 'A'.
public int foo(Object[] a) { return super.foo(a); }
^
1 error
By the way, it is not necessary for classes A, B, and C to be defined in the
same file with B and C defined as static member classes of A. The problem is
also present when the three classes are defined in separate files and not as
member classes.
- Nick
--
Summary: invalid "Can't find method" error
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: java
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rizzolo at gmail dot com
GCC host triplet: i386-redhat-linux
GCC target triplet: i386-redhat-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30844
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug java/30844] invalid "Can't find method" error
2007-02-18 21:03 [Bug java/30844] New: invalid "Can't find method" error rizzolo at gmail dot com
@ 2007-02-18 21:07 ` rizzolo at gmail dot com
2007-02-20 2:16 ` tromey at gcc dot gnu dot org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: rizzolo at gmail dot com @ 2007-02-18 21:07 UTC (permalink / raw)
To: java-prs
------- Comment #1 from rizzolo at gmail dot com 2007-02-18 21:07 -------
Created an attachment (id=13065)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13065&action=view)
The code causing the problem.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30844
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug java/30844] invalid "Can't find method" error
2007-02-18 21:03 [Bug java/30844] New: invalid "Can't find method" error rizzolo at gmail dot com
2007-02-18 21:07 ` [Bug java/30844] " rizzolo at gmail dot com
@ 2007-02-20 2:16 ` tromey at gcc dot gnu dot org
2007-02-20 3:25 ` rizzolo at gmail dot com
2007-02-20 23:07 ` tromey at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: tromey at gcc dot gnu dot org @ 2007-02-20 2:16 UTC (permalink / raw)
To: java-prs
------- Comment #2 from tromey at gcc dot gnu dot org 2007-02-20 02:16 -------
FWIW we've basically stopped fixing bugs in the older gcj front end
and instead we've switched to using ecj.
I would close this as "wontfix" but that seems a bit harsh to do
unannounced... so with your permission I'd like to.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30844
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug java/30844] invalid "Can't find method" error
2007-02-18 21:03 [Bug java/30844] New: invalid "Can't find method" error rizzolo at gmail dot com
2007-02-18 21:07 ` [Bug java/30844] " rizzolo at gmail dot com
2007-02-20 2:16 ` tromey at gcc dot gnu dot org
@ 2007-02-20 3:25 ` rizzolo at gmail dot com
2007-02-20 23:07 ` tromey at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: rizzolo at gmail dot com @ 2007-02-20 3:25 UTC (permalink / raw)
To: java-prs
------- Comment #3 from rizzolo at gmail dot com 2007-02-20 03:25 -------
Subject: Re: invalid "Can't find method" error
Ya gotta do what ya gotta do.
Thanks,
- Nick
On 20 Feb 2007 02:16:12 -0000, tromey at gcc dot gnu dot org
<gcc-bugzilla@gcc.gnu.org> wrote:
>
>
> ------- Comment #2 from tromey at gcc dot gnu dot org 2007-02-20 02:16 -------
> FWIW we've basically stopped fixing bugs in the older gcj front end
> and instead we've switched to using ecj.
> I would close this as "wontfix" but that seems a bit harsh to do
> unannounced... so with your permission I'd like to.
>
>
> --
>
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30844
>
> ------- You are receiving this mail because: -------
> You reported the bug, or are watching the reporter.
>
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30844
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug java/30844] invalid "Can't find method" error
2007-02-18 21:03 [Bug java/30844] New: invalid "Can't find method" error rizzolo at gmail dot com
` (2 preceding siblings ...)
2007-02-20 3:25 ` rizzolo at gmail dot com
@ 2007-02-20 23:07 ` tromey at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: tromey at gcc dot gnu dot org @ 2007-02-20 23:07 UTC (permalink / raw)
To: java-prs
------- Comment #4 from tromey at gcc dot gnu dot org 2007-02-20 23:07 -------
Fixed on trunk.
--
tromey at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30844
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-02-20 23:07 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-18 21:03 [Bug java/30844] New: invalid "Can't find method" error rizzolo at gmail dot com
2007-02-18 21:07 ` [Bug java/30844] " rizzolo at gmail dot com
2007-02-20 2:16 ` tromey at gcc dot gnu dot org
2007-02-20 3:25 ` rizzolo at gmail dot com
2007-02-20 23:07 ` tromey at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).