public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug java/19834] New: Eclipse bytecode miscompiled with -O --indirect-dispatch
@ 2005-02-09  7:20 mckinlay at redhat dot com
  2005-02-09  9:22 ` [Bug java/19834] " pinskia at gcc dot gnu dot org
  2005-02-12  6:25 ` mckinlay at redhat dot com
  0 siblings, 2 replies; 3+ messages in thread
From: mckinlay at redhat dot com @ 2005-02-09  7:20 UTC (permalink / raw)
  To: java-prs

The following test case gets miscompiled from bytecode with "-O
--indirect-dispatch". It doesn't appear to matter which compiler produced the
bytecode - the same error occurs with all of them.

import java.util.*;

public class Test
{
 static int i = 0;
 static int get()
 {
   return i++;
 }

 public static void main(String[] args) throws Exception
 {
   ArrayList headerElements = new ArrayList();

   while (true)
   {
     headerElements.add("");
     if (get() == 13)
   break;
   }

   int size = headerElements.size();

   if (size == 0)
     return;

   System.out.println(size);
   System.out.println(headerElements.size());
 }
}


$ gcj Test.java -O --indirect-dispatch --main=Test
$ ./a.out 
14
14
$ gcj -C Test.java; gcj Test.class -O --indirect-dispatch --main=Test
$ ./a.out 
1
14

-- 
           Summary: Eclipse bytecode miscompiled with -O --indirect-dispatch
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P2
         Component: java
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: mckinlay at redhat dot com
                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=19834


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

* [Bug java/19834] Eclipse bytecode miscompiled with -O --indirect-dispatch
  2005-02-09  7:20 [Bug java/19834] New: Eclipse bytecode miscompiled with -O --indirect-dispatch mckinlay at redhat dot com
@ 2005-02-09  9:22 ` pinskia at gcc dot gnu dot org
  2005-02-12  6:25 ` mckinlay at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-02-09  9:22 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-02-09 07:20 -------
Does this happen without -O if so this might not be a jave specific bug.

When I am sober enough to look at testcase more, I will look into this one.

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


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


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

* [Bug java/19834] Eclipse bytecode miscompiled with -O --indirect-dispatch
  2005-02-09  7:20 [Bug java/19834] New: Eclipse bytecode miscompiled with -O --indirect-dispatch mckinlay at redhat dot com
  2005-02-09  9:22 ` [Bug java/19834] " pinskia at gcc dot gnu dot org
@ 2005-02-12  6:25 ` mckinlay at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: mckinlay at redhat dot com @ 2005-02-12  6:25 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From mckinlay at redhat dot com  2005-02-11 20:56 -------
19907 is a dupe of this.

*** This bug has been marked as a duplicate of 19907 ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE


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


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

end of thread, other threads:[~2005-02-11 20:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-09  7:20 [Bug java/19834] New: Eclipse bytecode miscompiled with -O --indirect-dispatch mckinlay at redhat dot com
2005-02-09  9:22 ` [Bug java/19834] " pinskia at gcc dot gnu dot org
2005-02-12  6:25 ` mckinlay at redhat dot com

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