blob: 0f0359667b3893d4f0b9d6b79f75cfc3b1367f49 [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 %s -fsyntax-only -verify
Eli Friedman16c53782009-12-04 07:18:51 +00002// PR5543
3
4struct A { int x; union { int* y; float& z; }; }; struct B : A {int a;};
5int* a(B* x) { return x->y; }
6
7struct x { union { int y; }; }; x y; template <int X> int f() { return X+y.y; }
8int g() { return f<2>(); }
9