[v6,1/3] Fortran: Do not make_decl_rtl in trans_function_start

Message ID tencent_4568933B5EE21AC59C8554355EF345081A0A@qq.com
State New
Headers
Series fmv: Add -ftarget-clones-table option support |

Commit Message

Yangyu Chen Oct. 7, 2025, 12:44 p.m. UTC
  This patch is a preparation for the function multi-versioning support
in Fortran. The function multi-versioning support requires changing the
change_decl_assembler_name to add the target suffix, which is not
allowed after make_decl_rtl is called, since the assembler name will be
in the constant pool.

This patch removes the make_decl_rtl call in trans_function_start, and
it will finally be called in all my testcases since we will check it
whenever using the DECL_RTL macro.

Signed-off-by: Yangyu Chen <cyy@cyyself.name>

gcc/fortran/ChangeLog:

	* trans-decl.cc (trans_function_start): Remove call make_decl_rtl.
---
 gcc/fortran/trans-decl.cc | 3 ---
 1 file changed, 3 deletions(-)
  

Patch

diff --git a/gcc/fortran/trans-decl.cc b/gcc/fortran/trans-decl.cc
index 055698b1efd..31b4ee0ee52 100644
--- a/gcc/fortran/trans-decl.cc
+++ b/gcc/fortran/trans-decl.cc
@@ -3056,9 +3056,6 @@  trans_function_start (gfc_symbol * sym)
       rest_of_decl_compilation (fndecl, 1, 0);
     }
 
-  /* Create RTL for function definition.  */
-  make_decl_rtl (fndecl);
-
   allocate_struct_function (fndecl, false);
 
   /* function.cc requires a push at the start of the function.  */