public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* java/3096: GCJ does not increment
@ 2001-06-08 16:56 aneesha
0 siblings, 0 replies; 3+ messages in thread
From: aneesha @ 2001-06-08 16:56 UTC (permalink / raw)
To: gcc-gnats
>Number: 3096
>Category: java
>Synopsis: GCJ does not increment
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: wrong-code
>Submitter-Id: net
>Arrival-Date: Fri Jun 08 16:56:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Aneesh Aggarwal
>Release: gcc version 3.1 20010601 (experimental)
>Organization:
>Environment:
Linux 2.4 on x86
>Description:
GCJ does not increment the value of an entry in an array when
the increment operator "++" is used in front. It, however,
works when the operator is appended at the end.
>How-To-Repeat:
public class inc_test {
public static void main(String [] args) {
long a[];
a = new long[2];
for(int i = 0; i < 2; i++) {
++a[i];
System.out.println(" Value " + a[i]);
}
}
}
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: java/3096: GCJ does not increment
@ 2001-10-08 11:29 apbianco
0 siblings, 0 replies; 3+ messages in thread
From: apbianco @ 2001-10-08 11:29 UTC (permalink / raw)
To: aneesha, apbianco, gcc-bugs, gcc-prs, java-prs, nobody
Synopsis: GCJ does not increment
Responsible-Changed-From-To: unassigned->apbianco
Responsible-Changed-By: apbianco
Responsible-Changed-When: Mon Oct 8 11:29:47 2001
Responsible-Changed-Why:
Mine
State-Changed-From-To: open->feedback
State-Changed-By: apbianco
State-Changed-When: Mon Oct 8 11:29:47 2001
State-Changed-Why:
A patch has been tested and proposed. I will be checked in as soon as the copyright assignment clears:
http://gcc.gnu.org/ml/java/2001-10/msg00061.html
http://sources.redhat.com/cgi-bin/gnatsweb.pl?cmd=view&pr=3096&database=gcc
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: java/3096: GCJ does not increment
@ 2001-07-18 17:36 Alexandre Petit-Bianco
0 siblings, 0 replies; 3+ messages in thread
From: Alexandre Petit-Bianco @ 2001-07-18 17:36 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR java/3096; it has been noted by GNATS.
From: Alexandre Petit-Bianco <apbianco@cygnus.com>
To: aneesha@hpl.hp.com
Cc: gcc-gnats@gcc.gnu.org, gcc-bugs@gcc.gnu.org
Subject: Re: java/3096: GCJ does not increment
Date: Wed, 18 Jul 2001 17:26:14 -0700 (PDT)
aneesha@hpl.hp.com writes:
> GCJ does not increment the value of an entry in an array when
> the increment operator "++" is used in front. It, however,
> works when the operator is appended at the end.
The bug manifests itself only when compiling to native, regardless of
-f{no-}bounds-check. The index has to be a non numeric value.
When I put a breakpoint in expand_expr, I see that in the case of `++a[i]'
`(reg:SI 72)' is being returned. When `a[i]++' is presented, then
(queued:SI (mem:SI (reg:SI 70) 0)
(nil)
(nil)
(parallel[
(set (mem:SI (reg:SI 70) 0)
(plus:SI (mem:SI (reg:SI 70) 0)
(const_int 1 [0x1])))
(clobber (reg:CC 17 flags))
] )
(nil))
is returned. -S shows that no code is generated for `++a[i].'
./A
class T
{
public static void main(String [] args) {
int a[] = new int[1];
int i = 0;
++a[i];
System.out.println (a[i]);
}
}
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2001-10-08 11:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-08 16:56 java/3096: GCJ does not increment aneesha
2001-07-18 17:36 Alexandre Petit-Bianco
2001-10-08 11:29 apbianco
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).