This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: java/3096: GCJ does not increment


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]);
   }
 }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]