From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16374 invoked by alias); 21 Apr 2002 14:36:01 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 16315 invoked by uid 71); 21 Apr 2002 14:36:00 -0000 Resent-Date: 21 Apr 2002 14:36:00 -0000 Resent-Message-ID: <20020421143600.16313.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-To: nobody@gcc.gnu.org Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org, java-prs@gcc.gnu.org, bryce@waitaki.otago.ac.nz, tromey@redhat.com Resent-Reply-To: gcc-gnats@gcc.gnu.org, adam@xwt.org Received:(qmail 14928 invoked by uid 61); 21 Apr 2002 14:31:33 -0000 Message-Id:<20020421143133.14927.qmail@sources.redhat.com> Date: Sun, 21 Apr 2002 07:36:00 -0000 From: adam@xwt.org Reply-To: adam@xwt.org To: gcc-gnats@gcc.gnu.org Cc: bryce@waitaki.otago.ac.nz, tromey@redhat.com X-Send-Pr-Version:gnatsweb-2.9.3 (1.1.1.1.2.31) X-GNATS-Notify:bryce@waitaki.otago.ac.nz, tromey@redhat.com Subject: java/6393: alignment problems with jlong and inner class inheritance X-SW-Source: 2002-04/txt/msg01071.txt.bz2 List-Id: >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: