diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/template/this-targ1.C')
-rw-r--r-- | gcc/testsuite/g++.dg/template/this-targ1.C | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/template/this-targ1.C b/gcc/testsuite/g++.dg/template/this-targ1.C new file mode 100644 index 000000000..6864be5ab --- /dev/null +++ b/gcc/testsuite/g++.dg/template/this-targ1.C @@ -0,0 +1,23 @@ +// PR c++/47904 + +template <bool> +struct S +{ +}; + +template <class T> +class U +{ + T t; + int foo () const + { + S <sizeof (t) == 1> s; + return 1; + } + int bar () const + { + S <sizeof (t) == 1> s; + return 1; + } +}; + |