Debian Codegraph @

gcc/testsuite/g++.dg/guality/pr86687.C

raw
1 // PR debug/86687
2 // { dg-do run }
3 // { dg-options "-g" }
4
5 class string {
6 public:
7 string (int p) { this->p = p ; }
8 string (const string &s) { this->p = s.p; }
9
10 int p;
11 };
12
13 class foo {
14 public:
15 foo (string dir_hint) {
16 p = dir_hint.p; // { dg-final { gdb-test . "dir_hint.p" 3 } }
17 }
18
19 int p;
20 };
21
22 int
23 main (void)
24 {
25 string s = 3;
26 foo bar(s);
27 return !(bar.p == 3);
28 }