aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/template/crash23.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/template/crash23.C')
-rw-r--r--gcc/testsuite/g++.dg/template/crash23.C9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/template/crash23.C b/gcc/testsuite/g++.dg/template/crash23.C
new file mode 100644
index 00000000000..0c3eac1acbf
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/crash23.C
@@ -0,0 +1,9 @@
+// PR c++/17642
+
+template<int dim>
+int f(const int* const lsh, const int* const bbox, const int* const nghostzones, int d)
+{
+ for (int d=0; d<dim; ++d)
+ lsh[d] - (bbox[2*d+1] ? 0 : nghostzones[d]);
+}
+