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