* g++.dg/init/array2.C: New test.
From-SVN: r47009
This commit is contained in:
parent
fe5b6c1c50
commit
373bd0fac9
@ -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.
|
||||
|
8
gcc/testsuite/g++.dg/init/array2.C
Normal file
8
gcc/testsuite/g++.dg/init/array2.C
Normal 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];
|
Loading…
x
Reference in New Issue
Block a user