blob: 6e35eb2b14d7d2250f352d5f1a9fc29658dfd8aa [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
Anders Carlssondfdfc582010-11-07 19:13:55 +00004struct A { int x; union { int* y; float* z; }; }; struct B : A {int a;};
Eli Friedman16c53782009-12-04 07:18:51 +00005int* 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