https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119507
--- Comment #8 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The trunk branch has been updated by Andrew Pinski <pins...@gcc.gnu.org>: https://gcc.gnu.org/g:49926c2c657dd867f7329df6e250913fd1425475 commit r16-49-g49926c2c657dd867f7329df6e250913fd1425475 Author: Andrew Pinski <quic_apin...@quicinc.com> Date: Fri Mar 28 17:25:56 2025 -0700 except: Don't use the cached value of the gcc_except_table section for comdat functions [PR119507] This has been broken since GCC started to put the comdat functions' gcc_except_table into their own section; r0-118218-g3e6011cfebedfb. What would happen is after a non-comdat function is processed, the cached value would always be used even for comdat function. Instead we should create a new section for comdat functions. OK? Bootstrapped and tested on x86_64-linux-gnu. PR middle-end/119507 gcc/ChangeLog: * except.cc (switch_to_exception_section): Don't use the cached section if the current function is in comdat. gcc/testsuite/ChangeLog: * g++.dg/eh/pr119507.C: New test. Signed-off-by: Andrew Pinski <quic_apin...@quicinc.com>