https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119518

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Untested fix:
--- gcc/cp/decl.cc.jj   2025-03-27 19:13:58.000000000 +0100
+++ gcc/cp/decl.cc      2025-03-28 16:41:18.054543572 +0100
@@ -19452,7 +19452,8 @@ finish_function (bool inline_p)
       && !cp_function_chain->can_throw
       && !flag_non_call_exceptions
       && !decl_replaceable_p (fndecl,
-                             opt_for_fn (fndecl,
flag_semantic_interposition)))
+                             opt_for_fn (fndecl, flag_semantic_interposition))
+      && !lookup_attribute ("noipa", DECL_ATTRIBUTES (fndecl)))
     TREE_NOTHROW (fndecl) = 1;

  cleanup:

Reply via email to