Sign in
gnu
/
gcc
/
ab810952eb7c061e37054ddd1dfe0aa033365131
/
.
/
gcc
/
testsuite
/
g++.dg
/
ext
/
cond3.C
blob: 6390dc4270bffb33eed896e57480e189c9b05a15 [
file
] [
log
] [
blame
]
// PR c++/86184
// { dg-do run }
// { dg-options "" }
int
j
;
struct
X
{
X
()
{
j
++;
}
operator
bool
()
{
return
true
;
}
};
/* Only create X once. */
bool
b
=
X
()
?:
false
;
bool
b2
=
X
()
?
X
()
:
false
;
int
main
()
{
if
(
j
!=
3
)
__builtin_abort
();
}