public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: adam@xwt.org
To: gcc-gnats@gcc.gnu.org
Cc: bryce@waitaki.otago.ac.nz, tromey@redhat.com
Subject: java/6393: alignment problems with jlong and inner class inheritance
Date: Sun, 21 Apr 2002 07:36:00 -0000 [thread overview]
Message-ID: <20020421143133.14927.qmail@sources.redhat.com> (raw)
>Number: 6393
>Category: java
>Synopsis: alignment problems with jlong and inner class inheritance
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Apr 21 07:36:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: adam@xwt.org
>Release: unknown-1.0
>Organization:
>Environment:
GCJ-Linux, GCJ-PowerPC, GCJ-Win32
>Description:
The program below prints out
"0" rather than "3". Closer inspection reveals that foo() is looking
at a memory location four bytes less than wher y is. This behavior
occurs on both Win32 and Linux.
[[see how-to-repeat]]
>How-To-Repeat:
cat > test.java <<\EOF
abstract class sup {
long a;
boolean b;
public sup() { }
}
public class test {
public static void main(String[] s) { new inner(); }
static class inner extends sup {
int y = 3;
native void foo();
inner() { foo(); }
}
}
EOF
cat > test.cc <<\EOF
#include "test$inner.h"
#include "java/lang/System.h"
#include "java/io/PrintStream.h"
void test$inner::foo() {
java::lang::System::out->println(y);
}
EOF
jikes test.java
gcjh test\$inner
gcjh sup
CLASSPATH= gcj -I. test.cc test.java -fno-rtti --main=test
./a.out
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
next reply other threads:[~2002-04-21 14:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-04-21 7:36 adam [this message]
2003-05-12 19:36 Dara Hazeghi
2003-05-13 6:39 steven
2003-05-13 17:36 Adam Megacz
2003-05-13 17:52 steven
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020421143133.14927.qmail@sources.redhat.com \
--to=adam@xwt.org \
--cc=bryce@waitaki.otago.ac.nz \
--cc=gcc-gnats@gcc.gnu.org \
--cc=tromey@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).