diff mbox series

[Ada] Remove extra checks for non-static context from resolving 'Update

Message ID 20200707092736.GA41458@adacore.com
State New
Headers show
Series [Ada] Remove extra checks for non-static context from resolving 'Update | expand

Commit Message

Pierre-Marie de Rodat July 7, 2020, 9:27 a.m. UTC
Choices in attribute Update are evaluated, which includes checks for
non-static context, as part of their analysis and resolution, which
happens in Analyze_Array_Component_Update. There is no need to repeat
them while attribute is resolved.

This is just a cleanup, with no impact on the compiler; is motivated by
adding support for delta_aggregates in GNATprove and making sure that
both attribute Update and delta_aggregate are handled similarly.

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

gcc/ada/

	* sem_attr.adb (Resolve_Attribute): Do not call
	Check_Non_Static_Context.
diff mbox series

Patch

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
@@ -11999,13 +11999,10 @@  package body Sem_Attr is
 
                         if Nkind (C) /= N_Aggregate then
                            Analyze_And_Resolve (C, Etype (Indx));
-                           Check_Non_Static_Context (C);
-
                         else
                            C_E := First (Expressions (C));
                            while Present (C_E) loop
                               Analyze_And_Resolve (C_E, Etype (Indx));
-                              Check_Non_Static_Context (C_E);
 
                               Next (C_E);
                               Next_Index (Indx);