Skip to content
Snippets Groups Projects
Commit 39204ae9 authored by Jan Hubicka's avatar Jan Hubicka
Browse files

Fix division by zero in loop splitting

Profile update I added to tree-ssa-loop-split can divide by zero in
situation that the conditional is predicted with 0 probability which
is triggered by jump threading update in the testcase.

gcc/ChangeLog:

	PR middle-end/110923
	* tree-ssa-loop-split.cc (split_loop): Watch for division by zero.

gcc/testsuite/ChangeLog:

	PR middle-end/110923
	* gcc.dg/tree-ssa/pr110923.c: New test.
parent 0ac32323
Loading
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