From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexandre Petit-Bianco To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org Subject: Re: java/3096: GCJ does not increment Date: Wed, 18 Jul 2001 17:36:00 -0000 Message-id: <20010719003600.4676.qmail@sourceware.cygnus.com> X-SW-Source: 2001-07/msg00493.html List-Id: The following reply was made to PR java/3096; it has been noted by GNATS. From: Alexandre Petit-Bianco 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]); } }