OSDN Git Service
(root)
/
pf3gnuchains
/
gcc-fork.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
PR c++/29175
[pf3gnuchains/gcc-fork.git]
/
gcc
/
testsuite
/
g++.dg
/
init
/
ref12.C
1
// PR c++/17435
2
// { dg-do run }
3
4
extern "C" void abort ();
5
6
bool ok;
7
8
struct A
9
{
10
void func() const
11
{
12
ok = 1;
13
}
14
15
~A()
16
{
17
if (!ok)
18
abort ();
19
}
20
};
21
22
struct B : public A
23
{
24
};
25
26
int main()
27
{
28
A const& r1 = B();
29
r1.func();
30
}