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
d: Fix gdc -O2 -mavx generates misaligned vmovdqa instruction [PR114171]
[official-gcc.git]
/
gcc
/
testsuite
/
g++.old-deja
/
g++.jason
/
temporary8.C
blob
c24256e6b62d9cc9f9eb8e3b83dfadfc186838c4
1
// { dg-do run }
2
// Test for proper handling of temporaries in ?: exprs.
3
4
extern "C" int printf (const char *, ...);
5
int c = 0, d = 0;
6
7
class A {
8
public:
9
A() { ++c; }
10
A(const A&) { ++c; }
11
~A() { ++d; }
12
};
13
14
A f (const A& a)
15
{
16
return (c ? A() : A());
17
}
18
19
int main()
20
{
21
{
22
f (c ? A() : A());
23
}
24
printf ("%d %d\n", c, d);
25
return c != d || c != 2;
26
}