[Ada] Spurious dimensionality error on aggregate with "others" assoc.
This patch fixes a spurious dimensionality error on an array aggregate
with a single "others' clause whose expression is a dimensioned entity,
The expansion of the aggregate may create copies of the expression, and
the dimensionality check must use the type of the expression to retrieve
the proper dimension information to check against the dimensions of the
array component type.
2019-07-04 Ed Schonberg <schonberg@adacore.com>
gcc/ada/
* sem_dim.adb (Analyze_Dimension_Array_Aggregate): If the
component is an entity name, its dimensions are those of its
type.
gcc/testsuite/
* gnat.dg/dimensions2.adb, gnat.dg/dimensions2_phys.ads,
gnat.dg/dimensions2_real_numbers.ads: New testcase.
From-SVN: r273043