https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117516
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org --- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Created attachment 59803 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=59803&action=edit gcc15-pr117516.patch Untested fix. Note, this only fixes complexity (and improves behavior in that it doesn't repeatly diagnose the same bug over and over and instead diagnoses other bugs if there are as well) for the struct/class case, not if one constructs similar testcase with deep level of unions. Perhaps we need a hash_map once we recurse through certain number of UNION_TYPEs to note ones we've already handled, or something similar.