Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 %s -fsyntax-only -verify |
Andy Gibbs | 8e8fb3b | 2012-10-19 12:44:48 +0000 | [diff] [blame] | 2 | // expected-no-diagnostics |
Eli Friedman | 16c5378 | 2009-12-04 07:18:51 +0000 | [diff] [blame] | 3 | // PR5543 |
| 4 | |
Anders Carlsson | dfdfc58 | 2010-11-07 19:13:55 +0000 | [diff] [blame] | 5 | struct A { int x; union { int* y; float* z; }; }; struct B : A {int a;}; |
Eli Friedman | 16c5378 | 2009-12-04 07:18:51 +0000 | [diff] [blame] | 6 | int* a(B* x) { return x->y; } |
| 7 | |
| 8 | struct x { union { int y; }; }; x y; template <int X> int f() { return X+y.y; } |
| 9 | int g() { return f<2>(); } |
| 10 | |