r273594 - in /branches/gcc-9-branch/gcc: Change...

jason@gcc.gnu.org jason@gcc.gnu.org
Fri Jul 19 08:52:00 GMT 2019


Author: jason
Date: Fri Jul 19 08:52:41 2019
New Revision: 273594

URL: https://gcc.gnu.org/viewcvs?rev=273594&root=gcc&view=rev
Log:
	PR c++/82081 - tail call optimization breaks noexcept

If a noexcept function calls a function that might throw, doing the tail
call optimization means that an exception thrown in the called function
will propagate out, breaking the noexcept specification.  So we need to
prevent the optimization in that case.

	* tree-tailcall.c (find_tail_calls): Don't turn a call from a
	nothrow function to a might-throw function into a tail call.

Added:
    branches/gcc-9-branch/gcc/testsuite/g++.dg/tree-ssa/tail-call-1.C
Modified:
    branches/gcc-9-branch/gcc/ChangeLog
    branches/gcc-9-branch/gcc/tree-tailcall.c



More information about the Gcc-cvs mailing list