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

--- Comment #32 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot 
Uni-Bielefeld.DE> ---
> --- Comment #31 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
> If the important side-effect is allocation of some GC memory, then perhaps
> (assuming you also see just 5 initialize_cfun calls with 2xint, TFmode float,
> uint and bool) testing hack might be:

I haven't verified this yet.

> --- a/gcc/tree-inline.cc
> +++ b/gcc/tree-inline.cc
> @@ -2787,6 +2787,8 @@ initialize_cfun (tree new_fndecl, tree callee_fndecl,
> profile_count count)
>    /* Get clean struct function.  */
>    push_struct_function (new_fndecl, true);
>    targetm.target_option.relayout_function (new_fndecl);
> +  if (INTEGRAL_TYPE_P (TREE_TYPE (DECL_RESULT (new_fndecl))))
> +    gen_raw_REG (GET_MODE (TYPE_MODE (DECL_RESULT (new_fndecl))), 8);
>
>    /* We will rebuild these, so just sanity check that they are empty.  */
>    gcc_assert (VALUE_HISTOGRAMS (cfun) == NULL);

This doesn't compile as is:

In file included from /var/gcc/reghunt/master/gcc/tree-inline.cc:26:
/var/gcc/reghunt/master/gcc/tree-inline.cc: In function ‘void
initialize_cfun(tree, tree, profile_count)’:
/var/gcc/reghunt/master/gcc/rtl.h:728:54: error: base operand of ‘->’ is not a
pointer
  728 | #define GET_MODE(RTX)           ((machine_mode) (RTX)->mode)
      |                                                      ^~
/var/gcc/reghunt/master/gcc/tree-inline.cc:2791:18: note: in expansion of macro
‘GET_MODE’
 2791 |     gen_raw_REG (GET_MODE (TYPE_MODE (DECL_RESULT (new_fndecl))), 8);
      |                  ^~~~~~~~

Reply via email to