OSDN Git Service

* g++.dg/init/array2.C: New test.
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 14 Nov 2001 12:54:39 +0000 (12:54 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 14 Nov 2001 12:54:39 +0000 (12:54 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47009 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/init/array2.C [new file with mode: 0644]

index 0932909..ee057ac 100644 (file)
@@ -1,3 +1,7 @@
+2001-11-14  Richard Sandiford  <rsandifo@redhat.com>
+
+       * g++.dg/init/array2.C: New test.
+
 2001-11-14  Alexandre Oliva  <aoliva@redhat.com>
 
        * gcc.c-torture/execute/20010122-1.c: Prevent unwanted inlining.
diff --git a/gcc/testsuite/g++.dg/init/array2.C b/gcc/testsuite/g++.dg/init/array2.C
new file mode 100644 (file)
index 0000000..ca03ff3
--- /dev/null
@@ -0,0 +1,8 @@
+// Check that the type of an array is set correctly when flat initializers
+// are used.
+
+// { dg-do compile }
+
+struct s { int a; int b; };
+struct s x[] = { 1, 2, 3, 4 };
+int y[sizeof (x) == 2 * sizeof (x[0])? 1 : -1];