[llvm-commits] [126812] Fix http://lists.cs.uiuc.edu/pipermail/llvm-commits/ Week-of-Mon-20070430/048922.html
dpatel at apple.com
dpatel at apple.com
Wed May 2 18:11:10 PDT 2007
Revision: 126812
Author: dpatel
Date: 2007-05-02 18:11:09 -0700 (Wed, 02 May 2007)
Log Message:
-----------
Fix http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070430/048922.html
Modified Paths:
--------------
apple-local/branches/llvm/gcc/c-typeck.c
Modified: apple-local/branches/llvm/gcc/c-typeck.c
===================================================================
--- apple-local/branches/llvm/gcc/c-typeck.c 2007-05-02 23:33:36 UTC (rev 126811)
+++ apple-local/branches/llvm/gcc/c-typeck.c 2007-05-03 01:11:09 UTC (rev 126812)
@@ -1896,8 +1896,12 @@
* pointer, not an array. The LLVM backend supports this use of ARRAY_REF
* and it provides it with more information for optimization.
*/
- return build4 (ARRAY_REF, TREE_TYPE(TREE_TYPE(ar)), ar, index,
- NULL_TREE, NULL_TREE);
+ {
+ tree ty = TREE_TYPE(TREE_TYPE(ar));
+ if (TREE_CODE(ty) != ARRAY_TYPE)
+ ty = TYPE_MAIN_VARIANT (ty);
+ return build4 (ARRAY_REF, ty, ar, index, NULL_TREE, NULL_TREE);
+ }
#endif
/* APPLE LOCAL end LLVM */
More information about the llvm-commits
mailing list