aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/template/array13.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/template/array13.C')
-rw-r--r--gcc/testsuite/g++.dg/template/array13.C14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/template/array13.C b/gcc/testsuite/g++.dg/template/array13.C
new file mode 100644
index 00000000000..3bc152ce4f8
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/array13.C
@@ -0,0 +1,14 @@
+// PR c++/20208
+// { dg-do run }
+// { dg-options "-O2" }
+
+extern "C" void abort();
+
+template <typename T>
+inline void *Foo (T arg) { return &arg[0]; }
+
+int main () {
+ int bry[2];
+ if (Foo<int[2]>(bry) != bry)
+ abort();
+}