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
Sync usage with man page.
[netbsd-mini2440.git]
/
gnu
/
dist
/
gcc4
/
gcc
/
testsuite
/
g++.dg
/
expr
/
cast4.C
blob
72be9a6af19a2bb9b9e51e60e29caf17592691b4
1
// { dg-do run }
2
// PR c++/22132
3
4
extern "C" void abort ();
5
6
struct foo {
7
int a;
8
int b;
9
};
10
11
class Foobar : public foo {
12
public:
13
Foobar() { a = 1; b = 2; };
14
virtual ~Foobar() {};
15
};
16
17
Foobar obj;
18
const Foobar* objPtr = &obj;
19
foo* f = (foo*)objPtr;
20
21
int main () {
22
if (f->a != 1 || f->b != 2)
23
abort ();
24
}
25