public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: java/10335: Runtime error when trying to access an initialized static member.
@ 2003-04-07 12:08 reichelt
  0 siblings, 0 replies; 2+ messages in thread
From: reichelt @ 2003-04-07 12:08 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, java-prs, marcel.offermans, nobody

Synopsis: Runtime error when trying to access an initialized static member.

State-Changed-From-To: open->closed
State-Changed-By: reichelt
State-Changed-When: Mon Apr  7 12:08:57 2003
State-Changed-Why:
    Duplicate of PR 10334

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10335


^ permalink raw reply	[flat|nested] 2+ messages in thread

* java/10335: Runtime error when trying to access an initialized static member.
@ 2003-04-07 11:56 marcel.offermans
  0 siblings, 0 replies; 2+ messages in thread
From: marcel.offermans @ 2003-04-07 11:56 UTC (permalink / raw)
  To: gcc-gnats


>Number:         10335
>Category:       java
>Synopsis:       Runtime error when trying to access an initialized static member.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Apr 07 11:56:01 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     marcel.offermans@luminis.nl
>Release:        gcc-3.2.2
>Organization:
>Environment:
RedHat Linux 7.3
>Description:
Compile the class below like this:

gcj --main=A A.java

And it will give you a NPE when you run it. Uncomment the System.out.println statement which accesses B.a prior to assigning anything to B.a.a and everything works fine.

public class A {
    public static void main(String[] args) {
        //System.out.println("" + B.a);
        B.a.a = "test";
    }
}

class B {
    public static class C {
        public String a;
    }
    public static C a = new C();
}
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-04-07 12:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-07 12:08 java/10335: Runtime error when trying to access an initialized static member reichelt
  -- strict thread matches above, loose matches on Subject: below --
2003-04-07 11:56 marcel.offermans

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).