This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [gij] Fix array accesses


Andrew Pinski writes:
 > On Tue, 2007-01-09 at 15:50 +0000, Andrew Haley wrote:
 > > This patch changes code generations fo arrays in libgcj; it generates
 > > 
 > >   *((elemtype)(&array->data) + index*size_exp)
 > > 
 > > instead of 
 > > 
 > >   (array->data)[n]
 > > 
 > > Now, you might say "That's the same thing."  Well, it is, kinda sorta,
 > > but the array is defined as something like
 > > 
 > > typedef struct jcharArray
 > > {
 > >   short length;
 > >   jchar data[];
 > > } jcharArray;
 > 
 > Both of these should mean the same thing to IR, and if they don't there
 > is a bug else also.

Probably.  I traced through tree-ssa-structalias.c and I couldn't find
anyplace where the alias information was extracted.  I suppose
get_constraint_for_component_ref() should be doing it, but it isn't.

 > I wonder if this failure of the aliasing issue is related to
 > "gcc.c-torture/execute/pr15262-1.c" failing at -O2 also.

It looks similar.

Andrew.


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