aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJavier Miranda <miranda@adacore.com>2020-05-13 06:24:59 -0400
committerPierre-Marie de Rodat <derodat@adacore.com>2020-07-07 05:26:57 -0400
commit865ec5b024b21e3fe3fa764068f44ca315a7af63 (patch)
tree9fe2492eaaa40e572d21b636ea7ce3ecae966c67 /gcc
parent451187a3e58b4102dd8bb34589fa388a19c090bd (diff)
downloadgcc-865ec5b024b21e3fe3fa764068f44ca315a7af63.zip
gcc-865ec5b024b21e3fe3fa764068f44ca315a7af63.tar.gz
gcc-865ec5b024b21e3fe3fa764068f44ca315a7af63.tar.bz2
[Ada] Ada2020: AI12-0198 potentially unevaluated components of arrays
gcc/ada/ * sem_util.adb (Is_Potentially_Unevaluated): Code cleanup.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/sem_util.adb3
1 files changed, 1 insertions, 2 deletions
diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb
index 44ed3e6..2c9e274 100644
--- a/gcc/ada/sem_util.adb
+++ b/gcc/ada/sem_util.adb
@@ -17806,7 +17806,6 @@ package body Sem_Util is
N_Or_Else,
N_Quantified_Expression)
and then not (Nkind (Par) = N_Aggregate
- and then Present (Etype (Par))
and then Etype (Par) /= Any_Composite
and then Is_Array_Type (Etype (Par)))
loop
@@ -17854,6 +17853,7 @@ package body Sem_Util is
return Expr = Condition (Par);
elsif Nkind (Par) = N_Aggregate
+ and then Etype (Par) /= Any_Composite
and then Is_Array_Type (Etype (Par))
and then Nkind (Expr) = N_Component_Association
then
@@ -17874,7 +17874,6 @@ package body Sem_Util is
return True;
elsif Nkind (Choice) = N_Identifier
- and then Present (Etype (Choice))
and then Present (Scalar_Range (Etype (Choice)))
and then
Non_Static_Or_Null_Range (Scalar_Range (Etype (Choice)))