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
* cfgloopmanip.c (duplicate_loop_to_header_edge): Cleanup profile
[official-gcc.git]
/
gcc
/
testsuite
/
g++.old-deja
/
g++.jason
/
ref8.C
blob
97dd51acf52cefd7b327e211e4c58c499610a306
1
// { dg-do run }
2
// PRMS Id: 5184
3
// Bug: cast to C& below does not adjust address
4
5
struct A {};
6
struct B {
7
virtual void foo () {}
8
};
9
struct C : public B, public A {};
10
11
int main() {
12
C c;
13
14
A& ar = c;
15
C& cr = (C&)ar;
16
17
cr.foo(); // this line causes core dump
18
}