blob: 5179d918481485b6fe380ec4b814b16a65278b9f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
// This test currently fails because the C++ front end emits `A' as
// the base class called rather than `B' as it ought. At least it
// is erroring on the safe side...
struct A
{
virtual void foo();
virtual void bar();
};
void A::foo() { } // loose
void A::bar() { } // loose
struct B : public A
{
virtual void foo();
};
void B::foo() { } // keep
void _start() __asm__("_start"); // keep
A a;
B b; // keep
B *getme() { return &b; } // keep
void _start()
{
getme()->foo();
}
extern "C" void __main() { }
|