[llvm-commits] [llvm-gcc-4.0] r42503 - /llvm-gcc-4.0/trunk/gcc/c-typeck.c
Devang Patel
dpatel at apple.com
Mon Oct 1 14:24:01 PDT 2007
Author: dpatel
Date: Mon Oct 1 16:24:00 2007
New Revision: 42503
URL: http://llvm.org/viewvc/llvm-project?rev=42503&view=rev
Log:
Fix
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20071001/054127.html
Modified:
llvm-gcc-4.0/trunk/gcc/c-typeck.c
Modified: llvm-gcc-4.0/trunk/gcc/c-typeck.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.0/trunk/gcc/c-typeck.c?rev=42503&r1=42502&r2=42503&view=diff
==============================================================================
--- llvm-gcc-4.0/trunk/gcc/c-typeck.c (original)
+++ llvm-gcc-4.0/trunk/gcc/c-typeck.c Mon Oct 1 16:24:00 2007
@@ -1898,7 +1898,8 @@
*/
{
tree ty = TREE_TYPE(TREE_TYPE(ar));
- if (TREE_CODE(ty) != ARRAY_TYPE)
+ if (TREE_CODE(ty) == RECORD_TYPE || TREE_CODE(ty) == UNION_TYPE
+ || TREE_CODE(ty) == QUAL_UNION_TYPE)
ty = TYPE_MAIN_VARIANT (ty);
return build4 (ARRAY_REF, ty, ar, index, NULL_TREE, NULL_TREE);
}
More information about the llvm-commits
mailing list