* g++.dg/init/array2.C: New test.

From-SVN: r47009
This commit is contained in:
Richard Sandiford 2001-11-14 12:54:39 +00:00 committed by Richard Sandiford
parent fe5b6c1c50
commit 373bd0fac9
2 changed files with 12 additions and 0 deletions

View 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.

View File

@ -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];