annotate gcc/testsuite/g++.dg/torture/pr51737.C @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 // { dg-do compile }
kono
parents:
diff changeset
2 template<class T> class intrusive_ptr {
kono
parents:
diff changeset
3 public:
kono
parents:
diff changeset
4 ~intrusive_ptr() { intrusive_ptr_release( px ); }
kono
parents:
diff changeset
5 T * px;
kono
parents:
diff changeset
6 };
kono
parents:
diff changeset
7 template <typename T> struct intrusive_base {
kono
parents:
diff changeset
8 friend void intrusive_ptr_release(T* ptr) { delete ptr; }
kono
parents:
diff changeset
9 };
kono
parents:
diff changeset
10 struct section_info;
kono
parents:
diff changeset
11 struct file_info : intrusive_base<file_info> {
kono
parents:
diff changeset
12 intrusive_ptr<file_info> parent;
kono
parents:
diff changeset
13 intrusive_ptr<section_info> switched_section;
kono
parents:
diff changeset
14 };
kono
parents:
diff changeset
15 struct section_info : intrusive_base<section_info> {
kono
parents:
diff changeset
16 intrusive_ptr<section_info> parent;
kono
parents:
diff changeset
17 };
kono
parents:
diff changeset
18 struct id_state {
kono
parents:
diff changeset
19 void * start_file(void);
kono
parents:
diff changeset
20 };
kono
parents:
diff changeset
21 void * id_state::start_file(void) {
kono
parents:
diff changeset
22 intrusive_ptr<file_info> parent;
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
23 return 0;
111
kono
parents:
diff changeset
24 }
kono
parents:
diff changeset
25 struct id_generation_data : intrusive_base<id_generation_data> {
kono
parents:
diff changeset
26 void child_length() const {}
kono
parents:
diff changeset
27 };
kono
parents:
diff changeset
28 void generate_id(id_generation_data& generation_data)
kono
parents:
diff changeset
29 {
kono
parents:
diff changeset
30 generation_data.child_length();
kono
parents:
diff changeset
31 }