Hi Richard: The last attempt[1] from Jin Ma is to check the returned decl, and I agree that seems not the right way to fix it, but I'm not sure if that's the right way to fix this issue from your point of view?
Thanks [1] https://patchwork.sourceware.org/project/gcc/patch/20240910055552.591-1-ji...@linux.alibaba.com/ On Fri, Nov 1, 2024 at 4:19 PM KuanLin Chen <best124...@gmail.com> wrote: > > simulate_builtin_function_decl may return decl that be ggc_freed already > in pushdecl when duplicate_decls is true. Add a argument CREATE_P for > the caller to know if the return decl is usable. > > gcc/ChangeLog: > > * langhooks.h (simulate_builtin_function_decl): > Add one more argument. > * langhooks.cc (simulate_builtin_function_decl): Ditto. > * config/aarch64/aarch64-builtins.cc > (aarch64_general_simulate_builtin): > Add one more argument to fit simulate_builtin_function_decl. > (aarch64_init_simd_builtin_functions): Ditto. > * config/aarch64/aarch64-sve-builtins.cc > (function_builder::add_function): Ditto. > * config/arm/arm-mve-builtins.cc > (function_builder::add_function): Ditto. > * config/riscv/riscv-vector-builtins.cc > (function_builder::add_function): Ditto.