comparison gcc/testsuite/g++.dg/guality/pr86687.C @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents
children
comparison
equal deleted inserted replaced
111:04ced10e8804 131:84e7813d76e9
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 }