From: Markus Trippelsdorf Date: Fri, 16 Jan 2015 11:12:52 +0000 (+0000) Subject: g++.dg/ipa/pr64612.C: New test. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9377495d6a9c2c22036441c6bc7de0cf7728b4a9;p=gcc.git g++.dg/ipa/pr64612.C: New test. 2015-01-16 Markus Trippelsdorf PR ipa/64163 PR ipa/64612 * g++.dg/ipa/pr64612.C: New test. From-SVN: r219721 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 83fe97b82d1..4e657a47908 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2015-01-16 Markus Trippelsdorf + + PR ipa/64163 + PR ipa/64612 + * g++.dg/ipa/pr64612.C: New test. + 2015-01-16 Renlin Li * g++.dg/builtin-apply2.c: Remove aarch64 target from skip list. diff --git a/gcc/testsuite/g++.dg/ipa/pr64612.C b/gcc/testsuite/g++.dg/ipa/pr64612.C new file mode 100644 index 00000000000..f1cd96ad139 --- /dev/null +++ b/gcc/testsuite/g++.dg/ipa/pr64612.C @@ -0,0 +1,66 @@ +/* { 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 class QList +{ + B d; +public: + ~QList (); + class const_iterator + { + }; + const_iterator constBegin (); + void clear (); + void dealloc (); +}; +template QList::~QList () +{ + if (d.ref.deref ()) + dealloc (); +} +template +void +QList::clear () +{ + QList (); +} +class A1 : public QList +{ +}; +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);;) + ; +}