aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
authorPiotr Trojanek <trojanek@adacore.com>2023-01-11 00:22:03 +0100
committerMarc Poulhiès <poulhies@adacore.com>2023-05-15 11:36:42 +0200
commit4590d973dd629324fd5405cd4b2ef5d608528297 (patch)
tree36490fcf52bb922f0d66fdee28b9abc9a00b1e15 /gcc/ada
parenta3594ab9646e083eb0e5984907285f6f2162eeea (diff)
downloadgcc-4590d973dd629324fd5405cd4b2ef5d608528297.zip
gcc-4590d973dd629324fd5405cd4b2ef5d608528297.tar.gz
gcc-4590d973dd629324fd5405cd4b2ef5d608528297.tar.bz2
ada: Accept aggregates with OTHERS clause in unchecked type conversions
When inlining subprogram calls in GNATprove mode, the actual parameter is wrapped in an unchecked conversion. If this actual parameter is an aggregate OTHERS clause, then the type of unchecked conversion allows us to resolve this clause (just like for aggregates wrapped in a qualified expression). Previously such aggregates were rejected, which caused spurious and cryptic errors; now they are accepted. gcc/ada/ * sem_aggr.adb (Resolve_Aggregate): Accept aggregates with OTHERS appearing inside unchecked conversions.
Diffstat (limited to 'gcc/ada')
-rw-r--r--gcc/ada/sem_aggr.adb1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/ada/sem_aggr.adb b/gcc/ada/sem_aggr.adb
index 3ebb30d..2ccfe6d 100644
--- a/gcc/ada/sem_aggr.adb
+++ b/gcc/ada/sem_aggr.adb
@@ -1180,6 +1180,7 @@ package body Sem_Aggr is
| N_Component_Declaration
| N_Parameter_Specification
| N_Qualified_Expression
+ | N_Unchecked_Type_Conversion
| N_Reference
| N_Aggregate
| N_Extension_Aggregate