diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/template/anonunion1.C')
-rw-r--r-- | gcc/testsuite/g++.dg/template/anonunion1.C | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/template/anonunion1.C b/gcc/testsuite/g++.dg/template/anonunion1.C new file mode 100644 index 000000000..89a8c5bec --- /dev/null +++ b/gcc/testsuite/g++.dg/template/anonunion1.C @@ -0,0 +1,24 @@ +// PR c++/47303 +// { dg-do compile } +// { dg-options "-fabi-version=1" } + +struct Z +{ + void foo (int); +}; + +struct F +{ + typedef void (Z::*zm) (int); + typedef void (F::*fm) (int); + template <zm> + void bar (int) + { + union + { + Z z; + }; + } +}; + +F::fm m = &F::bar <&Z::foo>; |