aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp23/explicit-obj-eval-order.C
blob: 7ce81f32cc4b0608b4e8b562d9a9bacf16cacd4a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// PR c++/123989
// { dg-do run { target c++23 } }

struct A {
  int m = 42;

  void f(this A self, int n) {
    if (self.m != 42 || n != 43)
      __builtin_abort();
  }
};

int main() {
  A a;
  a.f(++a.m);
}