public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug java/22496] New: accept-invalid: allows access to members as if they were static
@ 2005-07-15 8:52 i_mezhirov at yahoo dot com
2005-07-15 11:56 ` [Bug java/22496] " pinskia at gcc dot gnu dot org
0 siblings, 1 reply; 2+ messages in thread
From: i_mezhirov at yahoo dot com @ 2005-07-15 8:52 UTC (permalink / raw)
To: java-prs
The code below is invalid, but GCJ compiles it.
The resulting bytecode fails JVM verification;
the generated native executable prints a random number.
$ gcj -v
Using built-in specs.
Reading specs from /usr/local/lib/gcc/i686-pc-linux-gnu/4.0.0/../../../libgcj.
spec
rename spec lib to liborig
Target: i686-pc-linux-gnu
Configured with: ../gcc-4.0.0/configure
Thread model: posix
gcc version 4.0.0
$ gcj Test.java --main=Main
//////////////////////////////////////////////
/// Test.java
class Foo
{
int N = 10;
}
class Main
{
void printN()
{
System.out.println("N = " + Foo.N); // SHOULD BE AN ERROR
}
public static void main(String[] args)
{
Main main = new Main();
main.printN();
}
}
--
Summary: accept-invalid: allows access to members as if they were
static
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: minor
Priority: P2
Component: java
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: i_mezhirov at yahoo dot com
CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu
dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22496
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug java/22496] accept-invalid: allows access to members as if they were static
2005-07-15 8:52 [Bug java/22496] New: accept-invalid: allows access to members as if they were static i_mezhirov at yahoo dot com
@ 2005-07-15 11:56 ` pinskia at gcc dot gnu dot org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-15 11:56 UTC (permalink / raw)
To: java-prs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-07-15 11:56 -------
*** This bug has been marked as a duplicate of 12459 ***
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22496
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-07-15 11:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-15 8:52 [Bug java/22496] New: accept-invalid: allows access to members as if they were static i_mezhirov at yahoo dot com
2005-07-15 11:56 ` [Bug java/22496] " pinskia 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).