Hi! I encounter a problem/pilot error when using the target_clones attribute. The symptom is that the default clone is not renamed in the output and thus conflicts with the (proper) global name which is used for the ifunc: $ nl -ba < /tmp/cc3jBX3x.s | grep sub1 12 .type __m_MOD_sub1, @function 13 __m_MOD_sub1: 35 .size __m_MOD_sub1, .-__m_MOD_sub1 ... 87 __m_MOD_sub1.resolver: 95 movl $__m_MOD_sub1.avx, %eax 104 movl $__m_MOD_sub1, %eax 105 movl $__m_MOD_sub1.sse, %edx 110 .size __m_MOD_sub1.resolver, .-__m_MOD_sub1.resolver 111 .globl __m_MOD_sub1 112 .type __m_MOD_sub1, @gnu_indirect_function 113 .set __m_MOD_sub1,__m_MOD_sub1.resolver I think that line 13 and 104 should talk about __m_MOD_sub1.default. AFAICT the target_clones attr is built well. gcc/multiple_target.cc:expand_target_clones() adds the required attr "target" "default" and properly does: (gdb) p old_name $6 = 0x7ffff6dfc090 "__m_MOD_sub1" (gdb) call debug_tree ( DECL_ASSEMBLER_NAME (decl) ) (gdb) n 301 && DECL_RTL_SET_P (decl)) (gdb) n 300 if (TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) (gdb) n 304 SET_DECL_ASSEMBLER_NAME (decl, name); (gdb) n 305 if (alias) (gdb) call debug_tree ( DECL_ASSEMBLER_NAME (decl) ) So if that would have been used for real, all would be fine i think. But still, that name is somehow not used, see fnname: #0 assemble_start_function (decl=, fnname=fnname@entry=0x7ffff6dfc090 "__m_MOD_sub1") at ../../../src/gcc-13.mine/gcc/varasm.cc:1979 #1 0x0000000000bec182 in rest_of_handle_final () at ../../../src/gcc-13.mine/gcc/final.cc:4238 #2 (anonymous namespace)::pass_final::execute (this=) at ../../../src/gcc-13.mine/gcc/final.cc:4320 #3 0x0000000000e9da3b in execute_one_pass (pass=) at ../../../src/gcc-13.mine/gcc/passes.cc:2644 #4 0x0000000000e9e300 in execute_pass_list_1 (pass=) at ../../../src/gcc-13.mine/gcc/passes.cc:2744 #5 0x0000000000e9e312 in execute_pass_list_1 (pass=) at ../../../src/gcc-13.mine/gcc/passes.cc:2745 #6 0x0000000000e9e312 in execute_pass_list_1 (pass=) at ../../../src/gcc-13.mine/gcc/passes.cc:2745 #7 0x0000000000e9e339 in execute_pass_list (fn=0x7ffff6dfe000, pass=) at ../../../src/gcc-13.mine/gcc/passes.cc:2755 #8 0x0000000000aef806 in cgraph_node::expand (this=) at ../../../src/gcc-13.mine/gcc/context.h:48 #9 cgraph_node::expand (this=) at ../../../src/gcc-13.mine/gcc/cgraphunit.cc:1787 I'm attaching the testcase, to be compiled with: $ ./gfortran -B. -o /tmp/out.o -c /scratch/src/gcc-13.mine/gcc/testsuite/gfortran.dg/attr_target_clones-1.f90 -O1 -fdump-tree-optimized /tmp/ccQU3Vkf.s: Assembler messages: /tmp/ccQU3Vkf.s:113: Error: symbol `__m_MOD_sub1' is already defined respectively $ ./gfortran -B. -o /tmp/out.s -S /scratch/src/gcc-13.mine/gcc/testsuite/gfortran.dg/attr_target_clones-1.f90 -O1 -fdump-tree-optimized and a git diff, which is not to be mistaken for a patch. I'd be grateful for help to understand why/who chooses to pick an unpleasant name, and, primarily, how to avoid that problem. Thoughts or hints? TIA! PS: Should i have rather asked on gcc-help?