summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/opt/array1.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/opt/array1.C')
-rw-r--r--gcc/testsuite/g++.dg/opt/array1.C20
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/opt/array1.C b/gcc/testsuite/g++.dg/opt/array1.C
new file mode 100644
index 000000000..c63ed22c8
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/array1.C
@@ -0,0 +1,20 @@
+// Copyright (C) 2004 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 29 Nov 2004 <nathan@codesourcery.com>
+
+// PR 18672:ICE gimplifying incomplete array type.
+// Origin: Magnus Fromreide <gcc@magfr.user.lysator.liu.se>
+
+struct A;
+
+struct D {
+ static A ary[];
+};
+extern A ary[];
+
+void Foo (A const *);
+
+void Bar ()
+{
+ Foo (D::ary);
+ Foo (::ary);
+}