summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/expr/cond6.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/expr/cond6.C')
-rw-r--r--gcc/testsuite/g++.dg/expr/cond6.C4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/testsuite/g++.dg/expr/cond6.C b/gcc/testsuite/g++.dg/expr/cond6.C
index 943aa85a96..8f7f084ce5 100644
--- a/gcc/testsuite/g++.dg/expr/cond6.C
+++ b/gcc/testsuite/g++.dg/expr/cond6.C
@@ -1,10 +1,11 @@
// { dg-do run }
extern "C" void abort ();
+bool ok = false;
struct B {
B() {}
- B(const B& b) { abort (); }
+ B(const B& b) { ok = true; }
};
struct D : public B {
@@ -21,4 +22,5 @@ D f() {
int main () {
b = (true ? f() : b);
+ return !ok;
}