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
modula2: Export all string to integral and fp number conversion functions
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
tc1
/
dr20.C
blob
93338518190ecd5ee649865b7c942688b7884b45
1
// { dg-do run }
2
// Origin: Giovanni Bajo <giovannibajo at gcc dot gnu dot org>
3
// DR20: Some clarifications needed for 12.8 para 15
4
5
extern "C" int printf(const char*, ...);
6
extern "C" void abort(void);
7
8
int count = 0;
9
10
class Thing {
11
public:
12
Thing() {
13
}
14
~Thing() {
15
}
16
Thing(const Thing&)
17
{
18
count += 1;
19
}
20
};
21
22
Thing f() {
23
Thing t;
24
return t;
25
}
26
27
int main(void)
28
{
29
Thing t2 = f();
30
printf("%d %x\n", count, &t2);
31
if (count != 0)
32
abort();
33
return 0;
34
}