diff options
Diffstat (limited to 'test/SemaTemplate/instantiate-anonymous-union.cpp')
-rw-r--r-- | test/SemaTemplate/instantiate-anonymous-union.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/SemaTemplate/instantiate-anonymous-union.cpp b/test/SemaTemplate/instantiate-anonymous-union.cpp index 7c75885..255454b 100644 --- a/test/SemaTemplate/instantiate-anonymous-union.cpp +++ b/test/SemaTemplate/instantiate-anonymous-union.cpp @@ -29,3 +29,21 @@ template <typename T> struct C { }; C<int> c0(0); + +namespace PR7088 { + template<typename T> + void f() { + union { + int a; + union { + float real; + T d; + }; + }; + + a = 17; + d = 3.14; + } + + template void f<double>(); +} |