Skip to content
Snippets Groups Projects
Commit 070523b9 authored by David Malcolm's avatar David Malcolm
Browse files

analyzer: fix infinite recursion false +ves [PR108935]


gcc/analyzer/ChangeLog:
	PR analyzer/108935
	* infinite-recursion.cc (contains_unknown_p): New.
	(sufficiently_different_region_binding_p): New function, splitting
	out inner loop from...
	(sufficiently_different_p): ...here.  Extend detection of unknown
	svalues to also include svalues that contain unknown.  Treat
	changes in frames below the entry to the recursion as being
	sufficiently different to reject being an infinite recursion.

gcc/testsuite/ChangeLog:
	PR analyzer/108935
	* gcc.dg/analyzer/infinite-recursion-pr108935-1.c: New test.
	* gcc.dg/analyzer/infinite-recursion-pr108935-1a.c: New test.
	* gcc.dg/analyzer/infinite-recursion-pr108935-2.c: New test.

Signed-off-by: default avatarDavid Malcolm <dmalcolm@redhat.com>
parent f769d22a
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