From 9aeab13cd96fa38c87ea6a9057d50fab58d12797 Mon Sep 17 00:00:00 2001 From: rsandifo Date: Wed, 14 Nov 2001 12:54:39 +0000 Subject: * g++.dg/init/array2.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47009 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/testsuite/g++.dg/init/array2.C | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 gcc/testsuite/g++.dg/init/array2.C (limited to 'gcc/testsuite/g++.dg/init') diff --git a/gcc/testsuite/g++.dg/init/array2.C b/gcc/testsuite/g++.dg/init/array2.C new file mode 100644 index 00000000000..ca03ff39c57 --- /dev/null +++ b/gcc/testsuite/g++.dg/init/array2.C @@ -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]; -- cgit v1.2.1