Index: llvm-convert.cpp
===================================================================
--- llvm-convert.cpp	(revision 41847)
+++ llvm-convert.cpp	(working copy)
@@ -5438,12 +5438,23 @@ LValue TreeToLLVM::EmitLV_XXXXPART_EXPR(
 }
 
 LValue TreeToLLVM::EmitLV_VIEW_CONVERT_EXPR(tree exp) {
-  // The address is the address of the operand.
-  LValue LV = EmitLV(TREE_OPERAND(exp, 0));
-  // The type is the type of the expression.
-  const Type *Ty = ConvertType(TREE_TYPE(exp));
-  LV.Ptr = BitCastToType(LV.Ptr, PointerType::get(Ty));
-  return LV;
+  // If the input is also an aggregate, the address is the address of the
+  // operand.
+  if (isAggregateTreeType(TREE_TYPE(exp))) {
+    LValue LV = EmitLV(TREE_OPERAND(exp, 0));
+    // The type is the type of the expression.
+    const Type *Ty = ConvertType(TREE_TYPE(exp));
+    LV.Ptr = BitCastToType(LV.Ptr, PointerType::get(Ty));
+    return LV;
+  } else {
+    // Otherwise, the input is a scalar, create a location to emit into, then
+    // use EmitVIEW_CONVERT_EXPR.
+    const Type *OpTy = ConvertType(TREE_TYPE(exp));
+    Value *Dest = CreateTemporary(OpTy);
+    
+    EmitVIEW_CONVERT_EXPR(exp, Dest);
+    return LValue(Dest);
+  }
 }
 
 //===----------------------------------------------------------------------===//
