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 libstdc++/54924 - Warn for std::string constructor with wrong size
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
lookup
/
using27.C
blob
c94cf6ea1a5669fe72dd467e43f466c106208f68
1
// PR c++/26256
2
// { dg-do run }
3
4
struct A
5
{
6
typedef int type;
7
};
8
9
struct B
10
{
11
typedef double type;
12
};
13
14
struct C : A, B
15
{
16
using A::type;
17
type d;
18
19
void f()
20
{
21
type e;
22
if (sizeof (type) != sizeof (A::type))
23
__builtin_abort();
24
}
25
26
void g();
27
};
28
29
void C::g()
30
{
31
type x;
32
if (sizeof (type) != sizeof (A::type))
33
__builtin_abort();
34
}
35
36
int main ()
37
{
38
if (sizeof (C::type) != sizeof (A::type))
39
__builtin_abort();
40
41
if (sizeof (C::d) != sizeof (A::type))
42
__builtin_abort();
43
44
C::type x;
45
C c;
46
c.f();
47
c.g();
48
}