]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Remove a couple of redundant calls to Set_Etype
authorEric Botcazou <ebotcazou@adacore.com>
Thu, 5 Jun 2025 11:14:33 +0000 (13:14 +0200)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Thu, 3 Jul 2025 08:16:24 +0000 (10:16 +0200)
The OK_Convert_To function already sets the Etype of its result.

gcc/ada/ChangeLog:

* exp_imgv.adb (Expand_Value_Attribute): Do not call Set_Etype on N
after rewriting it by means of OK_Convert_To.

gcc/ada/exp_imgv.adb

index 6c2b940736baca9fd4b1e51085f5e197958958fa..3fef6fabe64e9606de799cef9ccd74b93f71b828 100644 (file)
@@ -1631,7 +1631,6 @@ package body Exp_Imgv is
                Name => New_Occurrence_Of (RTE (Vid), Loc),
                Parameter_Associations => Args)));
 
-         Set_Etype (N, Btyp);
          Analyze_And_Resolve (N, Btyp);
          return;
 
@@ -1675,7 +1674,6 @@ package body Exp_Imgv is
                      Name => New_Occurrence_Of (RTE (Vid), Loc),
                      Parameter_Associations => Args)));
 
-               Set_Etype (N, Btyp);
                Analyze_And_Resolve (N, Btyp);
                return;
             end if;