1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -emit-llvm -o - %s | grep memcpy 2*f4a2713aSLionel Sambuc // PR1421 3*f4a2713aSLionel Sambuc 4*f4a2713aSLionel Sambuc struct A { 5*f4a2713aSLionel Sambuc char c; 6*f4a2713aSLionel Sambuc int i; 7*f4a2713aSLionel Sambuc }; 8*f4a2713aSLionel Sambuc 9*f4a2713aSLionel Sambuc struct B { 10*f4a2713aSLionel Sambuc int c; 11*f4a2713aSLionel Sambuc unsigned char x; 12*f4a2713aSLionel Sambuc }; 13*f4a2713aSLionel Sambuc 14*f4a2713aSLionel Sambuc union U { struct A a; struct B b; }; 15*f4a2713aSLionel Sambuc check(union U * u,union U * v)16*f4a2713aSLionel Sambucvoid check(union U *u, union U *v) { 17*f4a2713aSLionel Sambuc *u = *v; 18*f4a2713aSLionel Sambuc } 19