https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71029
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
Target Milestone|--- |11.0
--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Seems to have been fixed for GCC 11.1 with r11-5826:
c-family: Fix hang with -Wsequence-point [PR98126]
verify_sequence_points uses verify_tree to recursively walk the
subexpressions of an expression, and while recursing, it also
keeps lists of expressions found after/before a sequence point.
For a large expression, the list can grow significantly. And
merge_tlist is at least N(n^2): for a list of length n it will
iterate n(n -1) times, and call candidate_equal_p each time, and
that can recurse further. warn_for_collision also has to go
through the whole list. With a large-enough expression, the
compilation can easily get stuck here for 24 hours.
This patch is a simple kludge: if we see that the expression is
overly complex, don't even try.