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
* auto-profile.c (afdo_annotate_cfg): Use update_max_bb_count.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
init
/
pr35878_3.C
blob
9317ea1b231a2777b9d852098170ef9504270ca6
1
// PR c++/35878
2
// { dg-do compile }
3
// { dg-options "-O2 -std=gnu++17 -fdump-tree-optimized" }
4
// { dg-final { scan-tree-dump-not "v_\[0-9]+\\(D\\) \[=!]= 0" "optimized" } }
5
6
#include <new>
7
#include <utility>
8
9
struct s1{
10
int a;
11
int b;
12
int c;
13
};
14
15
void f1 (s1 * v, s1&& s)
16
{
17
new (v) s1(std::move(s));
18
}
19
20
void f2 (s1 * v, s1&& s)
21
{
22
*v = std::move(s);
23
}