repo.or.cz
/
netbsd-mini2440.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
No empty .Rs/.Re
[netbsd-mini2440.git]
/
gnu
/
dist
/
gcc4
/
gcc
/
testsuite
/
g++.dg
/
abi
/
layout1.C
blob
645ed6acfeeb4d6557e08748be5d31e5a8439ebd
1
// Red Hat bugzilla 64535
2
// Bug: We are allocationg stuff into the tail padding of POD class "A".
3
// { dg-do run }
4
5
struct A
6
{
7
int x;
8
char y;
9
};
10
11
struct B : public A {
12
virtual void f () {}
13
char z;
14
};
15
16
A a = { 21, 42 };
17
B b;
18
19
int
20
main (void)
21
{
22
b.x = 12;
23
b.y = 24;
24
b.z = 36;
25
26
A *ap = &b;
27
28
*ap = a;
29
30
return (b.z != 36);
31
}