public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-3735] [Ada] Interface behaves differently from abstract tagged null
@ 2021-09-21 15:26 Pierre-Marie de Rodat
0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2021-09-21 15:26 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:16e307b9a48813a08852fec16e77eb921db78b37
commit r12-3735-g16e307b9a48813a08852fec16e77eb921db78b37
Author: Javier Miranda <miranda@adacore.com>
Date: Fri Jul 2 13:13:12 2021 -0400
[Ada] Interface behaves differently from abstract tagged null
gcc/ada/
* exp_ch6.adb (Expand_Simple_Function_Return): For explicit
dereference of type conversion, enable code that ensures that
the tag of the result is that of the result type.
Diff:
---
gcc/ada/exp_ch6.adb | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb
index 50551847629..7717fa7c0ab 100644
--- a/gcc/ada/exp_ch6.adb
+++ b/gcc/ada/exp_ch6.adb
@@ -7437,6 +7437,10 @@ package body Exp_Ch6 is
and then not Is_Class_Wide_Type (Utyp)
and then (Nkind (Exp) in
N_Type_Conversion | N_Unchecked_Type_Conversion
+ or else (Nkind (Exp) = N_Explicit_Dereference
+ and then Nkind (Prefix (Exp)) in
+ N_Type_Conversion |
+ N_Unchecked_Type_Conversion)
or else (Is_Entity_Name (Exp)
and then Is_Formal (Entity (Exp))))
then
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-09-21 15:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-21 15:26 [gcc r12-3735] [Ada] Interface behaves differently from abstract tagged null Pierre-Marie de Rodat
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).