Node created by a call to New_Occurrence_Of (RTE (...), ...) has its
Etype set. There is no need to follow it with a call to Set_Etype.

Cleanup of various Analyze/Resolve routines.

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

gcc/ada/

        * sem_attr.adb (Analyze_Attribute): Don't call Set_Etype for
        Bit_Order attribute.
diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb
--- a/gcc/ada/sem_attr.adb
+++ b/gcc/ada/sem_attr.adb
@@ -3421,7 +3421,6 @@ package body Sem_Attr is
               New_Occurrence_Of (RTE (RE_Low_Order_First), Loc));
          end if;
 
-         Set_Etype (N, RTE (RE_Bit_Order));
          Resolve (N);
 
          --  Reset incorrect indication of staticness


Reply via email to