This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

RE: [tree-ssa] PATCH to generate ARRAY_REFs to INDIRECT_REFs


> Several people have objected to the C/C++ frontends generating pointer
> arithmetic rather than ARRAY_REFs when the array operand is an
> INDIRECT_REF.  The obvious fix doesn't seem to break anything.

Are you certain that this does not break testcases like this (at -O2):

int foo(char *ap) {
  return ap[1] == '-' && ap[2] == 0;
}

When I made essentially the same change in the llvmgcc frontend, it
triggered a problem in fold-const for the above case...

-Chris

-- 
http://llvm.cs.uiuc.edu/
http://www.nondot.org/~sabre/Projects/


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