repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Add qdf24xx base tuning support.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
initlist49.C
blob
0fa4e3f33437162996551ccd6ca563c53ae154d4
1
// Test for non-trivial list-initialization with array new.
2
// { dg-do run { target c++11 } }
3
4
struct A
5
{
6
enum E { c_string, number } e;
7
A(const char *): e(c_string) {}
8
A(int): e(number) {}
9
};
10
11
int main()
12
{
13
A* ap = new A[2]{1, ""};
14
if (ap[0].e != A::number || ap[1].e != A::c_string)
15
return 1;
16
delete[] ap;
17
}