On 25/3/2025 21:23, Kito Cheng wrote:
Will it only cause issues with this patch https://gcc.gnu.org/pipermail/gcc-patches/2025-March/678918.html
Yes. But I think we can merge this first. Thanks, Yangyu Chen
or will it cause problems with the current trunk as well? If the latter one, could you provide a case for that? Thanks :) On Tue, Mar 25, 2025 at 7:15 PM Yangyu Chen <[email protected]> wrote:We don't need to add priority in ASM name mangling, keeping this might cause an issue if we call another MV clone directly but only one place has the priority declared. gcc/ChangeLog: * config/riscv/riscv.cc (riscv_mangle_decl_assembler_name): Remove priority in fmv asm name mangling. Signed-off-by: Yangyu Chen <[email protected]> --- gcc/config/riscv/riscv.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gcc/config/riscv/riscv.cc b/gcc/config/riscv/riscv.cc index 38f3ae7cd84..4a042878554 100644 --- a/gcc/config/riscv/riscv.cc +++ b/gcc/config/riscv/riscv.cc @@ -13238,7 +13238,11 @@ riscv_mangle_decl_assembler_name (tree decl, tree id) /* Replace non-alphanumeric characters with underscores as the suffix. */ for (const char *c = version_string; *c; c++) - name += ISALNUM (*c) == 0 ? '_' : *c; + { + /* Skip ';' for ";priority" */ + if (*c == ';') break; + name += ISALNUM (*c) == 0 ? '_' : *c; + } if (DECL_ASSEMBLER_NAME_SET_P (decl)) SET_DECL_RTL (decl, NULL); -- 2.49.0
