summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/template/crash8.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/template/crash8.C')
-rw-r--r--gcc/testsuite/g++.dg/template/crash8.C20
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/template/crash8.C b/gcc/testsuite/g++.dg/template/crash8.C
new file mode 100644
index 000000000..a6f26b306
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/crash8.C
@@ -0,0 +1,20 @@
+// { dg-do compile }
+
+// Origin: David Robinson <drtr@dial.pipex.com>
+
+// PR c++/11513: ICE due to incorrect decision whether the tag is template.
+
+template <typename T>
+struct bar
+{
+ struct foo
+ {
+ int a;
+ };
+
+ template <typename U>
+ int wom(U c)
+ {
+ struct foo b;
+ }
+};