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

Subversion Repositories openrisc

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

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// PR c++/25811
2
// { dg-do compile }
3
 
4
struct A1
5
{
6
  int const j; // { dg-message "should be initialized" }
7
};
8
 
9
struct A2
10
{
11
  int const volatile i; // { dg-message "should be initialized" }
12
};
13
 
14
struct A3
15
{
16
  int& ref; // { dg-message "should be initialized" }
17
};
18
 
19
struct A4
20
{
21
  int const& ref; // { dg-message "should be initialized" }
22
};
23
 
24
struct A5
25
{
26
  int& ref; // { dg-message "should be initialized" }
27
  int const i; // { dg-message "should be initialized" }
28
};
29
 
30
template  struct S1
31
{
32
  T const i; // { dg-message "should be initialized" }
33
};
34
 
35
template  struct S2
36
{
37
  T const volatile i; // { dg-message "should be initialized" }
38
};
39
 
40
template  struct S3
41
{
42
  T& ref; // { dg-message "should be initialized" }
43
};
44
 
45
template  struct S4
46
{
47
  T const i; // { dg-message "should be initialized" }
48
  T& ref; // { dg-message "should be initialized" }
49
};
50
 
51
struct X
52
{
53
  X () : c (0), r (c) {}
54
  int const c;
55
  int const& r;
56
};
57
 
58
struct Y11
59
{
60
  int const i; // { dg-message "should be initialized" }
61
};
62
 
63
struct Y1
64
{
65
  Y11 a[1];
66
};
67
 
68
struct Y22
69
{
70
  int& ref; // { dg-message "should be initialized" }
71
};
72
 
73
struct Y2
74
{
75
  Y22 a[1];
76
};
77
 
78
struct Z1
79
{
80
  int const i; // { dg-message "should be initialized" }
81
};
82
 
83
struct Z2
84
{
85
  int& ref; // { dg-message "should be initialized" }
86
};
87
 
88
struct Z3
89
{
90
  int const i; // { dg-message "should be initialized" }
91
};
92
 
93
struct Z4
94
{
95
  int& ref; // { dg-message "should be initialized" }
96
};
97
 
98
struct Z5
99
{
100
  int i;
101
};
102
 
103
struct Z
104
{
105
  Z1 z1;
106
  Z2 z2;
107
  Z3 z3;
108
  Z4 z4;
109
  Z5 z5;
110
};
111
 
112
union U
113
{
114
  int const i; // { dg-message "should be initialized" }
115
};
116
 
117
void f1 ()
118
{
119
  new A1; // { dg-error "uninitialized const member" }
120
}
121
 
122
void f2 ()
123
{
124
  new A2; // { dg-error "uninitialized const member" }
125
}
126
 
127
void f3 ()
128
{
129
  new A3; // { dg-error "uninitialized reference member" }
130
}
131
 
132
void f4 ()
133
{
134
  new A4; // { dg-error "uninitialized reference member" }
135
}
136
 
137
void f5 ()
138
{
139
  new A5; // { dg-error "uninitialized reference member|uninitialized const member" }
140
}
141
 
142
void f6 ()
143
{
144
  new S1; // { dg-error "uninitialized const member" }
145
}
146
 
147
void f7 ()
148
{
149
  new S2; // { dg-error "uninitialized const member" }
150
}
151
 
152
void f8 ()
153
{
154
  new S3; // { dg-error "uninitialized reference member" }
155
}
156
 
157
void f9 ()
158
{
159
  new S4; // { dg-error "uninitialized reference member|uninitialized const member" }
160
}
161
 
162
void f10 ()
163
{
164
  new X;
165
}
166
 
167
void f11 ()
168
{
169
  new A1[1]; // { dg-error "uninitialized const member" }
170
}
171
 
172
void f12 ()
173
{
174
  new A3[1]; // { dg-error "uninitialized reference member" }
175
}
176
 
177
void f13 ()
178
{
179
  new Y1; // { dg-error "uninitialized const member" }
180
}
181
 
182
void f14 ()
183
{
184
  new Y2; // { dg-error "uninitialized reference member" }
185
}
186
 
187
void f15 ()
188
{
189
  new Z; // { dg-error "uninitialized reference member|uninitialized const member" }
190
}
191
 
192
void f16 ()
193
{
194
  new U; // { dg-error "uninitialized const member" }
195
}

powered by: WebSVN 2.1.0

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