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

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #2)
> This is riscv specific.
> As the diagnostics explains, riscv_vector::vector_insn_info has non-trivial
> default
> constructor, so either it should be used only in {quick,safe}_grow_cleared
> and not
> {quick,safe}_grow vec operation, or should be changed not to have non-trivial
> default constructor, because *_grow doesn't invoke the constructors, only
> *_grow_cleared does.
> --- gcc/config/riscv/riscv-vsetvl.cc.jj       2023-09-28 11:32:15.966436424 
> +0200
> +++ gcc/config/riscv/riscv-vsetvl.cc  2023-09-30 21:30:05.880134900 +0200
> @@ -2417,7 +2417,7 @@ vector_infos_manager::vector_infos_manag
>    vector_antin = nullptr;
>    vector_antout = nullptr;
>    vector_earliest = nullptr;
> -  vector_insn_infos.safe_grow (get_max_uid ());
> +  vector_insn_infos.safe_grow_cleared (get_max_uid ());
>    vector_block_infos.safe_grow (last_basic_block_for_fn (cfun));
>    if (!optimize)
>      {

This patch fixes the build for me; have not tested it otherwise.

Reply via email to