aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/overload/volatile2.C
blob: 9f27357aed655a6741636530b7af0e65e4c10126 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// PR c++/111160
// { dg-do compile { target c++11 } }

struct TheClass {
  TheClass() {}
  TheClass(volatile TheClass& t) {}
  TheClass operator=(volatile TheClass& t) volatile { return t; }
};
void the_func() {
  volatile TheClass x, y, z;
  (false ? x : y) = z;
}