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
/
nrvo1.d
blob
d93edfb200cc82e6298bcfc486f227447a8aa632
1
// { dg-do compile }
2
// { dg-additional-options "-fpreview=dip1000" }
3
ThreadInfo
*
ptr
;
4
5
ThreadInfo
receiveOnly
()
6
{
7
ThreadInfo
ret
;
8
9
get
({
ptr
= &
ret
;});
10
return
ret
;
11
}
12
13
struct
ThreadInfo
14
{
15
ThreadInfo
*
next
;
16
}
17
18
bool
get
(
T
)(
T
)
19
{
20
return false
;
21
}
22
23
void
main
()
24
{
25
auto
t
=
receiveOnly
();
26
assert
(&
t
==
ptr
);
27
}