OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [init/] [brace6.C] - Blame information for rev 693

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
/* PR c++/30759 */
2
/* { dg-do compile } */
3
 
4
struct A {
5
   A(int) { }
6
};
7
 
8
struct B {
9
   B(const B&);
10
   int b;
11
};
12
 
13
struct C {};
14
 
15
struct D { int c; };
16
 
17
int main()
18
{
19
   int i = { 1 };
20
   int j = { 1, 2 }; /* { dg-error "requires one element" } */
21
   A a = { 6 }; /* { dg-error "initialize" "" { target c++98 } } */
22
   B b = { 6 }; /* { dg-error "" } */
23
   C c = { 6 }; /* { dg-error "too many initializers" } */
24
   D d = { 6 };
25
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.