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
c++: fix explicit/copy problem [PR109247]
[official-gcc.git]
/
gcc
/
testsuite
/
gdc.dg
/
gdc218.d
blob
3e7eb16940aa28a997fa3ce42ec1721873550f48
1
// https://bugzilla.gdcproject.org/show_bug.cgi?id=218
2
// { dg-do compile }
3
4
struct
S218a
5
{
6
this
(
int
*
pdata_
)
7
{
8
pdata
=
pdata_
;
9
}
10
11
void
opIndexAssign
(
int
,
size_t
) { }
12
int
*
pdata
;
13
};
14
15
struct
S218
16
{
17
S218a
getS218a
()
18
{
19
return
S218a
(
data
.
ptr
);
20
}
21
22
int
[]
data
;
23
int
[]
tab2
;
24
};
25
26
S218
f
()
27
{
28
S218 r
;
29
30
for
(
int
i
=
0
;
i
<
1
; ++
i
)
31
r
.
getS218a
()[
0
] =
0
;
32
33
return
r
;
34
}
35
36
S218 var
;
37
38
static this
()
39
{
40
var
=
f
();
41
}