This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
RE: [tree-ssa] PATCH to generate ARRAY_REFs to INDIRECT_REFs
- From: Chris Lattner <sabre at nondot dot org>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Jason Merrill <jason at redhat dot com>
- Date: Wed, 20 Aug 2003 13:13:36 -0500 (CDT)
- Subject: 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/