diff options
| author | Eric Botcazou <ebotcazou@adacore.com> | 2026-02-03 08:45:23 +0100 |
|---|---|---|
| committer | Eric Botcazou <ebotcazou@adacore.com> | 2026-02-03 08:45:23 +0100 |
| commit | bb4791c336e5f5c6be707a6219b128da0a0a184b (patch) | |
| tree | d1308b737f9cfcfbc56a40f25132a444651d06b0 /libjava/classpath/gnu/java | |
| parent | c88be070dcec3b8c6ea996f79466f24fe65c798f (diff) | |
| download | gcc-bb4791c336e5f5c6be707a6219b128da0a0a184b.zip gcc-bb4791c336e5f5c6be707a6219b128da0a0a184b.tar.gz gcc-bb4791c336e5f5c6be707a6219b128da0a0a184b.tar.bz2 | |
Ada: Fix couple of small accessibility glitches
The first glitch is that the ACATS test c3a0025 does not pass in Ada 2005
because an accessibility check preempts a null access check. The second
glitch is that there should be no differences in Ada 2012 and later for
the test, in other words there is a missing accessibility check failure.
The second glitch comes from a thinko in the new implementation of the
In_Return_Value predicate, which has incorrectly dropped the handling of
assignments to return objects.
The first glitch is fixed by swapping the order of null access checks and
accessibility checks for conversions, which requires adding a small guard
to Apply_Discriminant_Check.
gcc/ada/
* checks.adb (Apply_Discriminant_Check): Bail out for a source type
that is a class-wide type whose root type has no discriminants.
* exp_ch4.adb (Expand_N_Type_Conversion): If the target type is an
access type, emit null access checks before accessibility checks.
* sem_util.adb (In_Return_Value): Deal again with assignments to
return objects.
Diffstat (limited to 'libjava/classpath/gnu/java')
0 files changed, 0 insertions, 0 deletions
