PR middle-end/77674
[official-gcc.git] / gcc / testsuite / g++.dg / warn / Winit-self-3.C
blobdd06ad017e96f442662e72d54d2cda4861c30bc6
1 // PR c++/64667
2 // { dg-options "-Winit-self" }
4 class A
6 public:
7   A(const A&) : a(a) {}  // { dg-warning "initialized with itself" }
8 private:
9   int a;
12 class B
14 public:
15   B(const B&) : b(b) {}  // { dg-warning "initialized with itself" }
16 private:
17   int* b;
20 class C
22 public:
23   C(const C&) : c(c) {}  // { dg-warning "initialized with itself" }
24 private:
25   int& c;