Merge r118368 from trunk into Morbo.  Radar 8629268.

llvm-svn: 119528
diff --git a/llvm-gcc-4.2/gcc/c-typeck.c b/llvm-gcc-4.2/gcc/c-typeck.c
index 3570925..d2344ae 100644
--- a/llvm-gcc-4.2/gcc/c-typeck.c
+++ b/llvm-gcc-4.2/gcc/c-typeck.c
@@ -3410,7 +3410,8 @@
 	 when we have proper support for integer constant expressions.  */
       val = get_base_address (arg);
       if (val && TREE_CODE (val) == INDIRECT_REF
-          && TREE_CONSTANT (TREE_OPERAND (val, 0)))
+      /* LLVM LOCAL treat only constant deref as pseudo-offsetof 8629268 */
+          && TREE_CODE (TREE_OPERAND (val, 0)) == INTEGER_CST)
 	{
 	  tree op0 = fold_convert (argtype, fold_offsetof (arg, val)), op1;