public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* java/1292: .java files are not compiled on demand (alt. unclear error)
@ 2000-12-20 12:24 osk
0 siblings, 0 replies; only message in thread
From: osk @ 2000-12-20 12:24 UTC (permalink / raw)
To: java-gnats
>Number: 1292
>Category: java
>Synopsis: .java files are not compiled on demand (alt. unclear error)
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: apbianco
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Dec 20 12:18:45 PST 2000
>Closed-Date: Thu Jul 06 17:48:18 PDT 2000
>Last-Modified: Thu Jul 6 17:49:59 PDT 2000
>Originator: Oskar Liljeblad
>Release: unknown-1.0
>Organization:
>Environment:
Debian GNU/Linux
GNU libc 2.1.3
gcc 2.96 snapshot 20000612
libgcj snapshot 2000-06-18
>Description:
Save the three attached source files and make sure the classes
haven't been compiled to .class or .o. Compilation in this order
gives:
$ gcj -c Super.java
$ gcj -C Test.java
$ gcj -c Test.class
Test.java:3: unexpected type on stack
This is caused by the fact that no UncompiledSub.class/.o
is available. I think that the error message printed should
indicate that the "unexpected type" is actually
UncompiledSub. (It took me some time to figure out what was
wrong here. A better error message would have helped.)
As an alternative, the UncompiledSub.java file could be automaticly
compiled when compiling Test.class.
Super.java:
public class Super { }
UncompiledSub.java:
public class UncompiledSub extends Super { }
Test.java:
public class Test {
public void doSomething(Super o) {
if (o instanceof UncompiledSub) {
System.out.println("Do something different");
}
}
}
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
Formerly PR gcj/271
From: Alexandre Petit-Bianco <apbianco@cygnus.com>
To: osk@hem.passagen.se
Cc: java-gnats@sourceware.cygnus.com
Subject: Re: gcj/271: .java files are not compiled on demand (alt. unclear error)
Date: Sat, 1 Jul 2000 21:13:04 -0700 (PDT)
osk@hem.passagen.se writes:
> This is caused by the fact that no UncompiledSub.class/.o
> is available. I think that the error message printed should
> indicate that the "unexpected type" is actually
> UncompiledSub.
A bug in the handling of the `instanceof' bytecode. Here's a patch.
./A
2000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
* expr.c (build_instanceof): Layout type after it's loaded.
Index: expr.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/java/expr.c,v
retrieving revision 1.79
diff -u -p -r1.79 expr.c
--- expr.c 2000/06/29 21:11:13 1.79
+++ expr.c 2000/07/02 04:06:33
@@ -1073,6 +1073,7 @@ build_instanceof (value, type)
if (CLASS_P (type) && ! CLASS_LOADED_P (type))
{
load_class (type, 1);
+ safe_layout_class (type);
if (! TYPE_SIZE (type) || TREE_CODE (TYPE_SIZE (type)) == ERROR_MARK)
return error_mark_node;
}
State-Changed-From-To: open->feedback
State-Changed-By: apbianco
State-Changed-When: Sat Jul 1 21:18:47 2000
State-Changed-Why:
I proposed a patch.
From: apbianco@cygnus.com
To: apbianco@cygnus.com, java-gnats@sourceware.cygnus.com, osk@hem.passagen.se
Cc:
Subject: Re: gcj/271
Date: 2 Jul 2000 04:18:47 -0000
Synopsis: .java files are not compiled on demand (alt. unclear error)
State-Changed-From-To: open->feedback
State-Changed-By: apbianco
State-Changed-When: Sat Jul 1 21:18:47 2000
State-Changed-Why:
I proposed a patch.
http://sourceware.cygnus.com/cgi-bin/gnatsweb.pl?cmd=view&pr=271&database=java
State-Changed-From-To: feedback->closed
State-Changed-By: apbianco
State-Changed-When: Thu Jul 6 17:48:18 2000
State-Changed-Why:
I checked in the following patch:
http://gcc.gnu.org/ml/gcc-patches/2000-07/msg00179.html
From: apbianco@cygnus.com
To: apbianco@cygnus.com, java-gnats@sourceware.cygnus.com, osk@hem.passagen.se
Cc:
Subject: Re: gcj/271
Date: 7 Jul 2000 00:48:18 -0000
Synopsis: .java files are not compiled on demand (alt. unclear error)
State-Changed-From-To: feedback->closed
State-Changed-By: apbianco
State-Changed-When: Thu Jul 6 17:48:18 2000
State-Changed-Why:
I checked in the following patch:
http://gcc.gnu.org/ml/gcc-patches/2000-07/msg00179.html
http://sourceware.cygnus.com/cgi-bin/gnatsweb.pl?cmd=view&pr=271&database=java
>Unformatted:
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2000-12-20 12:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-12-20 12:24 java/1292: .java files are not compiled on demand (alt. unclear error) osk
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).