public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug java/28754]  New: [4.2 regression] java.lang.nullPointerException while building ant with gcj-compiled ecj
@ 2006-08-16 16:30 bero at arklinux dot org
  2006-08-16 21:11 ` [Bug java/28754] " bero at arklinux dot org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: bero at arklinux dot org @ 2006-08-16 16:30 UTC (permalink / raw)
  To: java-prs

java.lang.NullPointerException
   at java.lang.System.arraycopy(libgcj.so.7)
   at
org.eclipse.jdt.internal.compiler.batch.Main.outputClassFiles(libecj.so.3)
   at org.eclipse.jdt.internal.compiler.batch.Main$1.acceptResult(libecj.so.3)
   at org.eclipse.jdt.internal.compiler.Compiler.compile(libecj.so.3)
   at
org.eclipse.jdt.internal.compiler.batch.Main.performCompilation(libecj.so.3)
   at org.eclipse.jdt.internal.compiler.batch.Main.compile(libecj.so.3)
   at java.lang.reflect.Method.invoke(libgcj.so.7)
   at com.sun.tools.javac.Main.compile(javac)
   at com.sun.tools.javac.Main.main(javac)


The same thing works perfectly if javac (==ecj) was compiled with gcj 4.1.1
instead of 4.2.0.


-- 
           Summary: [4.2 regression] java.lang.nullPointerException while
                    building ant with gcj-compiled ecj
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: java
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bero at arklinux dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28754


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

* [Bug java/28754] [4.2 regression] java.lang.nullPointerException while building ant with gcj-compiled ecj
  2006-08-16 16:30 [Bug java/28754] New: [4.2 regression] java.lang.nullPointerException while building ant with gcj-compiled ecj bero at arklinux dot org
@ 2006-08-16 21:11 ` bero at arklinux dot org
  2006-08-16 21:12 ` [Bug java/28754] [4.2 regression] java.lang.nullPointerException while accessing final static members of an interface bero at arklinux dot org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: bero at arklinux dot org @ 2006-08-16 21:11 UTC (permalink / raw)
  To: java-prs



------- Comment #1 from bero at arklinux dot org  2006-08-16 21:11 -------
Created an attachment (id=12085)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12085&action=view)
Simple test case

Attaching a simple test case -- in the "test" directory contained in this
tarball,

make works

produces the expected result

make breaks

causes a (wrong) NullPointerException.

The difference between the make targets is that "make works" uses gij, "make
breaks" binary-compiles with gcj.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28754


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

* [Bug java/28754] [4.2 regression] java.lang.nullPointerException while accessing final static members of an interface
  2006-08-16 16:30 [Bug java/28754] New: [4.2 regression] java.lang.nullPointerException while building ant with gcj-compiled ecj bero at arklinux dot org
  2006-08-16 21:11 ` [Bug java/28754] " bero at arklinux dot org
@ 2006-08-16 21:12 ` bero at arklinux dot org
  2006-09-10 17:00 ` jsm28 at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: bero at arklinux dot org @ 2006-08-16 21:12 UTC (permalink / raw)
  To: java-prs



------- Comment #2 from bero at arklinux dot org  2006-08-16 21:12 -------
Updating summary to reflect there's an easier test case than "compile ecj"


-- 

bero at arklinux dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.2 regression]            |[4.2 regression]
                   |java.lang.nullPointerExcepti|java.lang.nullPointerExcepti
                   |on while building ant with  |on while accessing final
                   |gcj-compiled ecj            |static members of an
                   |                            |interface


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28754


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

* [Bug java/28754] [4.2 regression] java.lang.nullPointerException while accessing final static members of an interface
  2006-08-16 16:30 [Bug java/28754] New: [4.2 regression] java.lang.nullPointerException while building ant with gcj-compiled ecj bero at arklinux dot org
  2006-08-16 21:11 ` [Bug java/28754] " bero at arklinux dot org
  2006-08-16 21:12 ` [Bug java/28754] [4.2 regression] java.lang.nullPointerException while accessing final static members of an interface bero at arklinux dot org
@ 2006-09-10 17:00 ` jsm28 at gcc dot gnu dot org
  2006-09-10 23:44 ` pinskia at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2006-09-10 17:00 UTC (permalink / raw)
  To: java-prs



-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.2.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28754


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

* [Bug java/28754] [4.2 regression] java.lang.nullPointerException while accessing final static members of an interface
  2006-08-16 16:30 [Bug java/28754] New: [4.2 regression] java.lang.nullPointerException while building ant with gcj-compiled ecj bero at arklinux dot org
                   ` (2 preceding siblings ...)
  2006-09-10 17:00 ` jsm28 at gcc dot gnu dot org
@ 2006-09-10 23:44 ` pinskia at gcc dot gnu dot org
  2006-09-11 15:08 ` tromey at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-09-10 23:44 UTC (permalink / raw)
  To: java-prs



------- Comment #3 from pinskia at gcc dot gnu dot org  2006-09-10 23:44 -------
I bet this is the same problem as PR 28663.

Also there is no makefile in the tarball so there is no way to test anything
here.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28754


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

* [Bug java/28754] [4.2 regression] java.lang.nullPointerException while accessing final static members of an interface
  2006-08-16 16:30 [Bug java/28754] New: [4.2 regression] java.lang.nullPointerException while building ant with gcj-compiled ecj bero at arklinux dot org
                   ` (3 preceding siblings ...)
  2006-09-10 23:44 ` pinskia at gcc dot gnu dot org
@ 2006-09-11 15:08 ` tromey at gcc dot gnu dot org
  2006-09-11 23:00 ` bero at arklinux dot org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: tromey at gcc dot gnu dot org @ 2006-09-11 15:08 UTC (permalink / raw)
  To: java-prs



------- Comment #4 from tromey at gcc dot gnu dot org  2006-09-11 15:08 -------
I tried to look at this today but the test is missing
a main method (I could work around the lack of a Makefile,
but this is more serious...)


-- 

tromey at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tromey at gcc dot gnu dot
                   |                            |org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28754


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

* [Bug java/28754] [4.2 regression] java.lang.nullPointerException while accessing final static members of an interface
  2006-08-16 16:30 [Bug java/28754] New: [4.2 regression] java.lang.nullPointerException while building ant with gcj-compiled ecj bero at arklinux dot org
                   ` (4 preceding siblings ...)
  2006-09-11 15:08 ` tromey at gcc dot gnu dot org
@ 2006-09-11 23:00 ` bero at arklinux dot org
  2006-09-11 23:26 ` tromey at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: bero at arklinux dot org @ 2006-09-11 23:00 UTC (permalink / raw)
  To: java-prs



------- Comment #5 from bero at arklinux dot org  2006-09-11 23:00 -------
Created an attachment (id=12229)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12229&action=view)
Real test case

Oops, must have attached the wrong file, that was the test case for a much
older problem (PR24598, which turned out to be compiler flag related)

Attaching the real test case that was meant for 28754. I haven't checked yet if
it still breaks in current SVN though


-- 

bero at arklinux dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #12085|0                           |1
        is obsolete|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28754


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

* [Bug java/28754] [4.2 regression] java.lang.nullPointerException while accessing final static members of an interface
  2006-08-16 16:30 [Bug java/28754] New: [4.2 regression] java.lang.nullPointerException while building ant with gcj-compiled ecj bero at arklinux dot org
                   ` (5 preceding siblings ...)
  2006-09-11 23:00 ` bero at arklinux dot org
@ 2006-09-11 23:26 ` tromey at gcc dot gnu dot org
  2006-09-12 15:55 ` tromey at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: tromey at gcc dot gnu dot org @ 2006-09-11 23:26 UTC (permalink / raw)
  To: java-prs



------- Comment #6 from tromey at gcc dot gnu dot org  2006-09-11 23:26 -------
Thanks for the updated test.

It fails for me if I compile it to .class with ecj, but not
if I compile it to .class with gcj.

The difference is in the qualification of the reference to
SUFFIX_CLASS in test2 .. ecj generates

  3: getstatic #24=<Field test2.SUFFIX_CLASS char[]>

but gcj uses test1 as the qualifier.

ecj is correct here fwiw.

I think the in C++ ABI case we probably should simply initialize
the interface that declares the field.


-- 

tromey at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |tromey at gcc dot gnu dot
                   |dot org                     |org
             Status|WAITING                     |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2006-09-11 23:26:15
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28754


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

* [Bug java/28754] [4.2 regression] java.lang.nullPointerException while accessing final static members of an interface
  2006-08-16 16:30 [Bug java/28754] New: [4.2 regression] java.lang.nullPointerException while building ant with gcj-compiled ecj bero at arklinux dot org
                   ` (6 preceding siblings ...)
  2006-09-11 23:26 ` tromey at gcc dot gnu dot org
@ 2006-09-12 15:55 ` tromey at gcc dot gnu dot org
  2006-09-12 15:55 ` tromey at gcc dot gnu dot org
  2007-01-03 14:24 ` aph at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: tromey at gcc dot gnu dot org @ 2006-09-12 15:55 UTC (permalink / raw)
  To: java-prs



------- Comment #7 from tromey at gcc dot gnu dot org  2006-09-12 15:55 -------
Fix checked in.


-- 

tromey at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28754


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

* [Bug java/28754] [4.2 regression] java.lang.nullPointerException while accessing final static members of an interface
  2006-08-16 16:30 [Bug java/28754] New: [4.2 regression] java.lang.nullPointerException while building ant with gcj-compiled ecj bero at arklinux dot org
                   ` (7 preceding siblings ...)
  2006-09-12 15:55 ` tromey at gcc dot gnu dot org
@ 2006-09-12 15:55 ` tromey at gcc dot gnu dot org
  2007-01-03 14:24 ` aph at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: tromey at gcc dot gnu dot org @ 2006-09-12 15:55 UTC (permalink / raw)
  To: java-prs



------- Comment #8 from tromey at gcc dot gnu dot org  2006-09-12 15:55 -------
Subject: Bug 28754

Author: tromey
Date: Tue Sep 12 15:55:07 2006
New Revision: 116890

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=116890
Log:
        PR java/28754:
        * expr.c (expand_java_field_op): Initialize field's declaring
        interface if necessary.

Modified:
    trunk/gcc/java/ChangeLog
    trunk/gcc/java/expr.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28754


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

* [Bug java/28754] [4.2 regression] java.lang.nullPointerException while accessing final static members of an interface
  2006-08-16 16:30 [Bug java/28754] New: [4.2 regression] java.lang.nullPointerException while building ant with gcj-compiled ecj bero at arklinux dot org
                   ` (8 preceding siblings ...)
  2006-09-12 15:55 ` tromey at gcc dot gnu dot org
@ 2007-01-03 14:24 ` aph at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: aph at gcc dot gnu dot org @ 2007-01-03 14:24 UTC (permalink / raw)
  To: java-prs



------- Comment #9 from aph at gcc dot gnu dot org  2007-01-03 14:24 -------
Subject: Bug 28754

Author: aph
Date: Wed Jan  3 14:23:48 2007
New Revision: 120396

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=120396
Log:
2007-01-03  Andrew Haley  <aph@redhat.com>

        PR java/28754
        * expr.c (expand_java_field_op): If we're initializing a field's
        declaring interface we should not also initialize the class
        context in which it was referenced.


Modified:
    branches/gcj/gcj-eclipse-merge-branch/gcc/java/ChangeLog
    branches/gcj/gcj-eclipse-merge-branch/gcc/java/expr.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28754


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

end of thread, other threads:[~2007-01-03 14:24 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-16 16:30 [Bug java/28754] New: [4.2 regression] java.lang.nullPointerException while building ant with gcj-compiled ecj bero at arklinux dot org
2006-08-16 21:11 ` [Bug java/28754] " bero at arklinux dot org
2006-08-16 21:12 ` [Bug java/28754] [4.2 regression] java.lang.nullPointerException while accessing final static members of an interface bero at arklinux dot org
2006-09-10 17:00 ` jsm28 at gcc dot gnu dot org
2006-09-10 23:44 ` pinskia at gcc dot gnu dot org
2006-09-11 15:08 ` tromey at gcc dot gnu dot org
2006-09-11 23:00 ` bero at arklinux dot org
2006-09-11 23:26 ` tromey at gcc dot gnu dot org
2006-09-12 15:55 ` tromey at gcc dot gnu dot org
2006-09-12 15:55 ` tromey at gcc dot gnu dot org
2007-01-03 14:24 ` aph 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).