Skip to content
Snippets Groups Projects
Commit 9e4c57f7 authored by Richard Biener's avatar Richard Biener Committed by Richard Biener
Browse files

tree-optimization/118973 - stray abnormal edge after DCE

DCE preserves stmts performing abnormal control flow transfer but
currently has an exception for replaceable allocations and cxa_atexit
calls.  That results in a broken CFG since DCE isn't set up to prune
abnormal edges possibly hanging off those.

While we could try to add this handling, the following is the safe
fix at this point and more suitable for backporting.

	PR tree-optimization/118973
	* tree-ssa-dce.cc (mark_stmt_if_obviously_necessary): Calls
	that alter control flow in unpredictable ways need to be
	preserved.

	* g++.dg/torture/pr118973.C: New testcase.
parent 27ebd2a5
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment