blob: 246afee23990417b80cd3565cf60b5412923c6de [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 %s -fsyntax-only -verify
Andy Gibbs8e8fb3b2012-10-19 12:44:48 +00002// expected-no-diagnostics
Eli Friedman16c53782009-12-04 07:18:51 +00003// PR5543
4
Anders Carlssondfdfc582010-11-07 19:13:55 +00005struct A { int x; union { int* y; float* z; }; }; struct B : A {int a;};
Eli Friedman16c53782009-12-04 07:18:51 +00006int* a(B* x) { return x->y; }
7
8struct x { union { int y; }; }; x y; template <int X> int f() { return X+y.y; }
9int g() { return f<2>(); }
10