https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119507
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Assignee|unassigned at gcc dot gnu.org |pinskia at gcc dot
gnu.org
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2025-03-29
Known to fail| |4.8.0
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.
This has been true since the support for moving comdat gcc_except_table to
their own section in r0-118218-g3e6011cfebedfb (which was first included in GCC
4.8.0).
Something like this:
```
diff --git a/gcc/except.cc b/gcc/except.cc
index d5eb9274a62..c385473de8e 100644
--- a/gcc/except.cc
+++ b/gcc/except.cc
@@ -2935,7 +2935,14 @@ switch_to_exception_section (const char * ARG_UNUSED
(fnname))
{
section *s;
- if (exception_section)
+ if (exception_section
+ /* Don't use the cached section for comdat if it will be different. */
+#ifdef HAVE_LD_EH_GC_SECTIONS
+ || !(targetm_common.have_named_sections
+ && DECL_COMDAT_GROUP (current_function_decl)
+ && HAVE_COMDAT_GROUP)
+#endif
+ )
s = exception_section;
else
{
```