summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/template/crash30.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/template/crash30.C')
-rw-r--r--gcc/testsuite/g++.dg/template/crash30.C16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/template/crash30.C b/gcc/testsuite/g++.dg/template/crash30.C
new file mode 100644
index 000000000..145b07673
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/crash30.C
@@ -0,0 +1,16 @@
+// PR c++/19034
+
+template< bool C > struct B
+{
+};
+
+template<typename S> int foo();
+template<typename S> int foo1();
+
+template<typename T> struct bar : public B <(sizeof(foo<T>()) == 1)>
+{
+};
+
+template<typename T> struct bar1 : public B <(sizeof(foo1<T>()) == 1)>
+{
+};