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
PR c++/81917 - ICE with void_t and partial specialization.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
opt
/
call2.C
blob
1b4d4b3fc6c83ac4165cce9fea7a18a5dbb726ac
1
// { dg-do run }
2
// { dg-options "-O" }
3
4
struct Foo
5
{
6
Foo() : a(1), b(1), c('a') {}
7
int a;
8
int b;
9
char c;
10
};
11
12
static Foo copy_foo(Foo) __attribute__((noinline, noclone));
13
14
static Foo copy_foo(Foo A)
15
{
16
return A;
17
}
18
19
struct Bar : Foo
20
{
21
Bar(Foo t) : Foo(copy_foo(t)) {}
22
};
23
24
Foo F;
25
26
int main (void)
27
{
28
Bar B (F);
29
30
if (B.a != 1 || B.b != 1 || B.c != 'a')
31
__builtin_abort ();
32
33
return 0;
34
}