aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface
diff options
context:
space:
mode:
authorSteve Baird <baird@adacore.com>2022-01-24 16:46:58 -0800
committerPierre-Marie de Rodat <derodat@adacore.com>2022-05-11 08:53:17 +0000
commit88e9690610c421a7ece2331828b9799755d7ddba (patch)
treea459437b4cc50bb31c1f5ed96c5034cebed0a04a /gcc/ada/gcc-interface
parentc48a779f64c68f73f50c5993c818ead9faf8d013 (diff)
downloadgcc-88e9690610c421a7ece2331828b9799755d7ddba.zip
gcc-88e9690610c421a7ece2331828b9799755d7ddba.tar.gz
gcc-88e9690610c421a7ece2331828b9799755d7ddba.tar.bz2
[Ada] Properly reject unsupported address specifications
In the case of an object declaration with an indefinite nominal subtype (roughly speaking, that's an object that takes its bounds, discriminants, and/or tag from its explicit initial value), GNAT does not support address specifications unless the size of the object is known at compile time. In some cases, such unsupported address specifications were not properly rejected. This could lead to either an internal error during compilation or (in the class-wide case) to a warning accompanied by raising Program_Error at run time. gcc/ada/ * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Replace the existing check for an address specification for an object of a class-wide type with a more general check which rejects either the class-wide case or the case where the FE would (if the address specification were accepted) build a malformed tree (specifically, an object renaming declaration with a specified address). In the case where the check fails, reject the construct at compile time instead of generating an unconditional raise of Program_Error. * doc/gnat_rm/representation_clauses_and_pragmas.rst: Update documentation to reflect these changes. * gnat_rm.texi: Regenerate.
Diffstat (limited to 'gcc/ada/gcc-interface')
0 files changed, 0 insertions, 0 deletions