Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/g++.dg/ipa/pr64612.C @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
68:561a7518be6b | 111:04ced10e8804 |
---|---|
1 /* { dg-do compile } */ | |
2 /* { dg-options "-O3 -std=c++11" } */ | |
3 /* { dg-final { scan-assembler "_ZN5QListI7QStringED1Ev" { target comdat_group } } } */ | |
4 | |
5 class A | |
6 { | |
7 public: | |
8 bool deref (); | |
9 }; | |
10 class QString; | |
11 struct B | |
12 { | |
13 A ref; | |
14 }; | |
15 template <typename> class QList | |
16 { | |
17 B d; | |
18 public: | |
19 ~QList (); | |
20 class const_iterator | |
21 { | |
22 }; | |
23 const_iterator constBegin (); | |
24 void clear (); | |
25 void dealloc (); | |
26 }; | |
27 template <typename T> QList<T>::~QList () | |
28 { | |
29 if (d.ref.deref ()) | |
30 dealloc (); | |
31 } | |
32 template <typename T> | |
33 void | |
34 QList<T>::clear () | |
35 { | |
36 QList (); | |
37 } | |
38 class A1 : public QList<QString> | |
39 { | |
40 }; | |
41 class B1 | |
42 { | |
43 public: | |
44 B1 (A1); | |
45 }; | |
46 struct F | |
47 { | |
48 void addMatch (const QString &&); | |
49 A1 m_matchingMimeTypes; | |
50 }; | |
51 class G | |
52 { | |
53 A1 matchingGlobs (const QString &) const; | |
54 }; | |
55 void | |
56 F::addMatch (const QString &&) | |
57 { | |
58 m_matchingMimeTypes.clear (); | |
59 } | |
60 A1 | |
61 G::matchingGlobs (const QString &) const | |
62 { | |
63 A1 a; | |
64 for (B1 b (a);;) | |
65 ; | |
66 } |