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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 693 jeremybenn
// PR c++/43719
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
 
118
void f1 ()
119
{
120
  A1 a1; // { dg-error "uninitialized const member" }
121
}
122
 
123
void f2 ()
124
{
125
  A2 a2; // { dg-error "uninitialized const member" }
126
}
127
 
128
void f3 ()
129
{
130
  A3 a3; // { dg-error "uninitialized reference member" }
131
}
132
 
133
void f4 ()
134
{
135
  A4 a4; // { dg-error "uninitialized reference member" }
136
}
137
 
138
void f5 ()
139
{
140
  A5 a5; // { dg-error "uninitialized reference member|uninitialized const member" }
141
}
142
 
143
void f6 ()
144
{
145
  S1 s; // { dg-error "uninitialized const member" }
146
}
147
 
148
void f7 ()
149
{
150
  S2 s; // { dg-error "uninitialized const member" }
151
}
152
 
153
void f8 ()
154
{
155
  S3 s; // { dg-error "uninitialized reference member" }
156
}
157
 
158
void f9 ()
159
{
160
  S4 s; // { dg-error "uninitialized reference member|uninitialized const member" }
161
}
162
 
163
void f10 ()
164
{
165
  X x;
166
}
167
 
168
void f11 ()
169
{
170
  A1 a[ 1 ]; // { dg-error "uninitialized const member" }
171
}
172
 
173
void f12 ()
174
{
175
  A3 a[ 1 ]; // { dg-error "uninitialized reference member" }
176
}
177
 
178
void f13 ()
179
{
180
  Y1 y1; // { dg-error "uninitialized const member" }
181
}
182
 
183
void f14 ()
184
{
185
  Y2 y2; // { dg-error "uninitialized reference member" }
186
}
187
 
188
void f15 ()
189
{
190
  Z z; // { dg-error "uninitialized reference member|uninitialized const member" }
191
}
192
 
193
void f16 ()
194
{
195
  U u; // { dg-error "uninitialized const member" }
196
}
197
 

powered by: WebSVN 2.1.0

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