Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/g++.dg/tree-ssa/ehcleanup-1.C @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
line wrap: on
line source
// { dg-options "-O2 -fdump-tree-ehcleanup1-details" } #ifdef __GXX_EXPERIMENTAL_CXX0X__ #define NOEXCEPT_FALSE noexcept (false) #else #define NOEXCEPT_FALSE #endif extern void can_throw (); class a { public: ~a () NOEXCEPT_FALSE { if (0) can_throw (); } }; void t (void) { class a a; can_throw (); } // We ought to remove implicit cleanup, since destructor is empty. // { dg-final { scan-tree-dump-times "Empty EH handler" 2 "ehcleanup1" } } // // And as a result also contained control flow. // { dg-final { scan-tree-dump-times "Removing unreachable" 4 "ehcleanup1" } } //