repo.or.cz
/
gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Fortran: Fix PR 47485.
[gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
nsdmi-virtual1.C
blob
aeafe1cc51c6bb2bd19d4f1887a3d94b4c81ea33
1
// PR c++/51611
2
// { dg-do run { target c++11 } }
3
4
struct A
5
{
6
A(): i(42) { }
7
int i;
8
int f() { return i; }
9
};
10
11
struct B : virtual A
12
{
13
int j = i + f();
14
int k = A::i + A::f();
15
};
16
17
struct C: B { int pad; };
18
19
int main()
20
{
21
C c;
22
if (c.j != 84 || c.k != 84)
23
__builtin_abort();
24
}
25