17fda20777785ae0076aa9f1c49ff6639cb7299efNick Lewycky// RUN: %clang_cc1 -emit-llvm -std=c++11 -o - %s -triple x86_64-pc-linux-gnu | FileCheck %s
27fda20777785ae0076aa9f1c49ff6639cb7299efNick Lewycky
37fda20777785ae0076aa9f1c49ff6639cb7299efNick Lewyckystruct A {
47fda20777785ae0076aa9f1c49ff6639cb7299efNick Lewycky  A &operator=(A&&);
57fda20777785ae0076aa9f1c49ff6639cb7299efNick Lewycky};
67fda20777785ae0076aa9f1c49ff6639cb7299efNick Lewycky
77fda20777785ae0076aa9f1c49ff6639cb7299efNick Lewyckystruct B {
87fda20777785ae0076aa9f1c49ff6639cb7299efNick Lewycky  A a;
97fda20777785ae0076aa9f1c49ff6639cb7299efNick Lewycky  int i;
107fda20777785ae0076aa9f1c49ff6639cb7299efNick Lewycky  bool b;
117fda20777785ae0076aa9f1c49ff6639cb7299efNick Lewycky  char c;
127fda20777785ae0076aa9f1c49ff6639cb7299efNick Lewycky  long l;
137fda20777785ae0076aa9f1c49ff6639cb7299efNick Lewycky  float f;
147fda20777785ae0076aa9f1c49ff6639cb7299efNick Lewycky};
157fda20777785ae0076aa9f1c49ff6639cb7299efNick Lewycky
167fda20777785ae0076aa9f1c49ff6639cb7299efNick Lewyckyvoid test1() {
177fda20777785ae0076aa9f1c49ff6639cb7299efNick Lewycky  B b1, b2;
187fda20777785ae0076aa9f1c49ff6639cb7299efNick Lewycky  b1 = static_cast<B&&>(b2);
197fda20777785ae0076aa9f1c49ff6639cb7299efNick Lewycky}
207fda20777785ae0076aa9f1c49ff6639cb7299efNick Lewycky
217fda20777785ae0076aa9f1c49ff6639cb7299efNick Lewycky// CHECK-LABEL: define {{.*}} @_ZN1BaSEOS_
227fda20777785ae0076aa9f1c49ff6639cb7299efNick Lewycky// CHECK: call {{.*}} @_ZN1AaSEOS_
237fda20777785ae0076aa9f1c49ff6639cb7299efNick Lewycky// CHECK-NOT: store
247fda20777785ae0076aa9f1c49ff6639cb7299efNick Lewycky// CHECK: call {{.*}}memcpy{{.*}}, i64 24
257fda20777785ae0076aa9f1c49ff6639cb7299efNick Lewycky// CHECK-NOT: store
267fda20777785ae0076aa9f1c49ff6639cb7299efNick Lewycky// CHECK: ret
27