diff --git a/src/builder.rs b/src/builder.rs index e7f1e7e6b90..62d7997d50a 100644 --- a/src/builder.rs +++ b/src/builder.rs @@ -959,7 +959,7 @@ impl<'a, 'gcc, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'gcc, 'tcx> { let deref = ptr.dereference(self.location).to_rvalue(); let loaded_value = function.new_local( self.location, - aligned_type, + pointee_ty, &format!("loadedValue{}", self.next_value_counter()), ); block.add_assignment(self.location, loaded_value, deref);