public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug java/17216] New: ICE in 3.5, error in 3.4.1  when compiling .class->.o
@ 2004-08-27 18:08 ovidr at users dot sourceforge dot net
  2004-08-27 20:49 ` [Bug java/17216] " tromey at gcc dot gnu dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: ovidr at users dot sourceforge dot net @ 2004-08-27 18:08 UTC (permalink / raw)
  To: java-prs

javac -target 1.1 stat.java
gcj -c stat.class

3.4.1: stat$B.java:0: error: non-static method 'stat$B.internal_new_GC(int)' 
overrides static method

3.5: stat.class:0: internal compiler error: in size_binop, at fold-const.c:1707


class stat {

        public static void main(String[] a) {
                stat s = new stat();
        }       

        class B extends A {
                public long internal_new_GC(int a) {
                        return 0L;
                }
        }

        public abstract class A implements I {

        }

        public interface I {
                public long internal_new_GC (int a);
        }


}

(might be related to PR 15888, but that one is compiling .java source, 
not .class)

-- 
           Summary: ICE in 3.5, error in 3.4.1  when compiling .class->.o
           Product: gcc
           Version: 3.4.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: java
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ovidr at users dot sourceforge dot net
                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=17216


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

* [Bug java/17216] ICE in 3.5, error in 3.4.1  when compiling .class->.o
  2004-08-27 18:08 [Bug java/17216] New: ICE in 3.5, error in 3.4.1 when compiling .class->.o ovidr at users dot sourceforge dot net
@ 2004-08-27 20:49 ` tromey at gcc dot gnu dot org
  2004-09-14  1:50 ` cvs-commit at gcc dot gnu dot org
  2004-09-14  1:52 ` tromey at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: tromey at gcc dot gnu dot org @ 2004-08-27 20:49 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From tromey at gcc dot gnu dot org  2004-08-27 20:49 -------
I've investigated this a little.
This is another miranda method bug.

javac -target 1.1 emits an explicit redeclaration
of I.internal_new_GC in A.  This declaration is
marked Synthetic.

In class.c:layout_class_method, we don't set the DECL_VINDEX
for a method if "DECL_ARTIFICIAL (method_decl)".

This means that when we try to set the vindex for
B.internal_new_GC, we do find a super_method, but the
super_method does not have an assigned vtable slot.

I believe the solution is to remove the test for DECL_ARTIFICIAL
when doing vtable layout.  I'll test a patch.




-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |tromey at gcc dot gnu dot
                   |dot org                     |org
             Status|UNCONFIRMED                 |ASSIGNED
            Summary|ICE in 3.5, error in 3.4.1  |ICE in 3.5, error in 3.4.1
                   |when compiling .class->.o   |when compiling .class->.o


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


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

* [Bug java/17216] ICE in 3.5, error in 3.4.1  when compiling .class->.o
  2004-08-27 18:08 [Bug java/17216] New: ICE in 3.5, error in 3.4.1 when compiling .class->.o ovidr at users dot sourceforge dot net
  2004-08-27 20:49 ` [Bug java/17216] " tromey at gcc dot gnu dot org
@ 2004-09-14  1:50 ` cvs-commit at gcc dot gnu dot org
  2004-09-14  1:52 ` tromey at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-09-14  1:50 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-09-14 01:50 -------
Subject: Bug 17216

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	tromey@gcc.gnu.org	2004-09-14 01:50:15

Modified files:
	gcc/java       : ChangeLog class.c 

Log message:
	PR java/17216:
	* class.c (layout_class_method): Put synthetic methods into the
	vtable.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/java/ChangeLog.diff?cvsroot=gcc&r1=1.1452&r2=1.1453
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/java/class.c.diff?cvsroot=gcc&r1=1.206&r2=1.207



-- 


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


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

* [Bug java/17216] ICE in 3.5, error in 3.4.1  when compiling .class->.o
  2004-08-27 18:08 [Bug java/17216] New: ICE in 3.5, error in 3.4.1 when compiling .class->.o ovidr at users dot sourceforge dot net
  2004-08-27 20:49 ` [Bug java/17216] " tromey at gcc dot gnu dot org
  2004-09-14  1:50 ` cvs-commit at gcc dot gnu dot org
@ 2004-09-14  1:52 ` tromey at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: tromey at gcc dot gnu dot org @ 2004-09-14  1:52 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From tromey at gcc dot gnu dot org  2004-09-14 01:52 -------
I've checked in the fix.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.0.0


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


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

end of thread, other threads:[~2004-09-14  1:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-27 18:08 [Bug java/17216] New: ICE in 3.5, error in 3.4.1 when compiling .class->.o ovidr at users dot sourceforge dot net
2004-08-27 20:49 ` [Bug java/17216] " tromey at gcc dot gnu dot org
2004-09-14  1:50 ` cvs-commit at gcc dot gnu dot org
2004-09-14  1:52 ` tromey 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).