Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/g++.dg/opt/pr85393.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | |
children |
line wrap: on
line source
// PR rtl-optimization/85393 // { dg-do run { target c++11 } } // { dg-options "-O2" } // { dg-additional-sources "pr85393-aux.cc" } #include <stdexcept> #include <vector> void foo (char const *s); struct S { ~S () noexcept (false) { throw std::runtime_error ("foo"); } }; int main (int argc, char *argv[]) { std::vector <std::vector <char> > args; try { { S k; foo ("A"); } if (argv) throw std::runtime_error ("foo"); args.push_back ({}); } catch (std::runtime_error const& e) {} }