+2015-01-16 Markus Trippelsdorf <markus@trippelsdorf.de>
+
+ PR ipa/64163
+ PR ipa/64612
+ * g++.dg/ipa/pr64612.C: New test.
+
2015-01-16 Renlin Li <renlin.li@arm.com>
* g++.dg/builtin-apply2.c: Remove aarch64 target from skip list.
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-O3 -std=c++11" } */
+/* { dg-final { scan-assembler "_ZN5QListI7QStringED1Ev" } } */
+
+class A
+{
+public:
+ bool deref ();
+};
+class QString;
+struct B
+{
+ A ref;
+};
+template <typename> class QList
+{
+ B d;
+public:
+ ~QList ();
+ class const_iterator
+ {
+ };
+ const_iterator constBegin ();
+ void clear ();
+ void dealloc ();
+};
+template <typename T> QList<T>::~QList ()
+{
+ if (d.ref.deref ())
+ dealloc ();
+}
+template <typename T>
+void
+QList<T>::clear ()
+{
+ QList ();
+}
+class A1 : public QList<QString>
+{
+};
+class B1
+{
+public:
+ B1 (A1);
+};
+struct F
+{
+ void addMatch (const QString &&);
+ A1 m_matchingMimeTypes;
+};
+class G
+{
+ A1 matchingGlobs (const QString &) const;
+};
+void
+F::addMatch (const QString &&)
+{
+ m_matchingMimeTypes.clear ();
+}
+A1
+G::matchingGlobs (const QString &) const
+{
+ A1 a;
+ for (B1 b (a);;)
+ ;
+}