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); } _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits