1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 %s -fsyntax-only -verify 2*f4a2713aSLionel Sambuc // expected-no-diagnostics 3*f4a2713aSLionel Sambuc // PR5543 4*f4a2713aSLionel Sambuc 5*f4a2713aSLionel Sambuc struct A { int x; union { int* y; float* z; }; }; struct B : A {int a;}; a(B * x)6*f4a2713aSLionel Sambucint* a(B* x) { return x->y; } 7*f4a2713aSLionel Sambuc f()8*f4a2713aSLionel Sambucstruct x { union { int y; }; }; x y; template <int X> int f() { return X+y.y; } g()9*f4a2713aSLionel Sambucint g() { return f<2>(); } 10*f4a2713aSLionel Sambuc 11