diff mbox series

[Ada] Remove redundant code related to instances with formal subprograms

Message ID 20220105113329.GA2712845@adacore.com
State New
Headers show
Series [Ada] Remove redundant code related to instances with formal subprograms | expand

Commit Message

Pierre-Marie de Rodat Jan. 5, 2022, 11:33 a.m. UTC
Cleanup related to expansion of dispatching wrappers for GNATprove,
which just like instantiation involves copying of a specification from
an existing subprogram.

Tested on x86_64-pc-linux-gnu, committed on trunk

gcc/ada/

	* sem_ch12.adb (Instantiate_Formal_Subprogram): Remove redundant
	call to Set_Defining_Unit_Name; a similar call is done few lines
	below.
diff mbox series

Patch

diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb
--- a/gcc/ada/sem_ch12.adb
+++ b/gcc/ada/sem_ch12.adb
@@ -10866,7 +10866,6 @@  package body Sem_Ch12 is
         and then Expander_Active
       then
          New_Subp := Make_Temporary (Sloc (Actual), 'S');
-         Set_Defining_Unit_Name (New_Spec, New_Subp);
       else
          New_Subp := Make_Defining_Identifier (Loc, Chars (Formal_Sub));
       end if;