summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/template/crash19.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/template/crash19.C')
-rw-r--r--gcc/testsuite/g++.dg/template/crash19.C17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/template/crash19.C b/gcc/testsuite/g++.dg/template/crash19.C
new file mode 100644
index 000000000..a28827f31
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/crash19.C
@@ -0,0 +1,17 @@
+// PR c++/15165
+
+struct S
+{
+ template <class T> S(const T &e);
+};
+int operator *(const double, const S &);
+template <class T>
+struct X {
+ enum { SIXTY_FOUR=64 };
+ struct node {
+ unsigned char *ptr[sizeof(T)*SIXTY_FOUR];
+ void d() {}
+ };
+ node *head;
+};
+template struct X<int>;