diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2024-05-20 18:08:07 +0200 |
---|---|---|
committer | Marc Poulhiès <poulhies@adacore.com> | 2024-06-20 10:50:55 +0200 |
commit | 3a16f19777f882f98b6d901a81157779e898f636 (patch) | |
tree | 05ed358f8fa76ba736ee00a560894e26f1b4c584 /gcc/ada/init.c | |
parent | 9cf95147c04c64344466f6e41ce5be32fbde96e0 (diff) | |
download | gcc-3a16f19777f882f98b6d901a81157779e898f636.zip gcc-3a16f19777f882f98b6d901a81157779e898f636.tar.gz gcc-3a16f19777f882f98b6d901a81157779e898f636.tar.bz2 |
ada: Fix bogus error with "=" operator on array of private unchecked union
The code is legal and, therefore, must be accepted by the compiler, but it
must raise Program_Error at run time due to operands not having inferable
discriminants and a warning be given at compile time (RM B.3.3(22-23)).
gcc/ada/
* exp_ch4.adb (Expand_Array_Equality.Component_Equality): Copy the
Comes_From_Source flag from the original test to the new one, and
remove obsolete code dealing with unchecked unions.
* sem_util.adb (Has_Inferable_Discriminants): Return False for an
incomplete or private nominal subtype.
Diffstat (limited to 'gcc/ada/init.c')
0 files changed, 0 insertions, 0 deletions