https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101068
Bug ID: 101068 Summary: Analyzer does not purge constraints in loops (e.g. in explode-2.c) Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: analyzer Assignee: dmalcolm at gcc dot gnu.org Reporter: dmalcolm at gcc dot gnu.org Target Milestone: --- Looking at gcc.dg/analyzer/explode-2.c, it appears that it treats the SSA names for the results of the two "get" calls as constant within the loop i.e. they acquire constraints on the first iteration due to the while/switch edges that are taken, and these constraints aren't purged when processing subsequent iterations. Hence, rather than: while (get ()) { switch (get ()) { [...snip...] } } the analyzer effectively treats this as: int a, b; a = get (); b = get (); while (a) { switch (b) { [...snip...] } } and this artifically helps stop this testcase from exploding.