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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
In the debugger I see it is the missing DECL_DISREGARD_INLINE_LIMITS flag:
(gdb) p $1->function_decl.disregard_inline_limits
$3 = 0
(gdb) p $1->function_decl.declared_inline_flag
$4 = 1
(gdb) p lookup_attribute ("always_inline", $1->decl_common.attributes)
$5 = (tree_node *) 0x7fffea2e5ac8
(gdb) p debug_generic_stmt (decl_assembler_name ($1))
_ZN7VariantCI119VariantConstructorsIS_EEi

--- gcc/cp/method.cc.jj 2024-02-15 09:51:34.474065798 +0100
+++ gcc/cp/method.cc    2024-04-19 22:36:06.432859471 +0200
@@ -3309,6 +3309,8 @@ implicitly_declare_fn (special_function_
       constexpr_p = DECL_DECLARED_CONSTEXPR_P (inherited_ctor);
       /* Also copy any attributes.  */
       DECL_ATTRIBUTES (fn) = clone_attrs (DECL_ATTRIBUTES (inherited_ctor));
+      DECL_DISREGARD_INLINE_LIMITS (fn)
+       = DECL_DISREGARD_INLINE_LIMITS (inherited_ctor);
     }

   /* Add the "this" parameter.  */
fixes this, the question is what other flags remembered from attributes we
should copy.

Reply via email to