aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/expr/cond12.C
blob: 9134f81668ff1aae206c710880a43ef91c9b3541 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// PR c++/58714
// { dg-do run }

struct X {
    X& operator=(const X&){}
    X& operator=(X&){__builtin_abort();}
};

int main(int argv,char**) {
  X a, b;
  ((argv > 2) ? a : b) = X();
}