public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r11-1882] [Ada] Handle explicit dereferences in expression functions
@ 2020-07-07 9:28 Pierre-Marie de Rodat
0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2020-07-07 9:28 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:dae09f9b557b1a38b4743a4213f7ca47c48eec81
commit r11-1882-gdae09f9b557b1a38b4743a4213f7ca47c48eec81
Author: Ed Schonberg <schonberg@adacore.com>
Date: Tue May 12 08:20:22 2020 -0400
[Ada] Handle explicit dereferences in expression functions
gcc/ada/
* freeze.adb (Freeze_Expr_Types): Freeze the designated type of
the explicit dereference.
Diff:
---
gcc/ada/freeze.adb | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb
index 7df283a32c4..fd76e7bc63c 100644
--- a/gcc/ada/freeze.adb
+++ b/gcc/ada/freeze.adb
@@ -7934,6 +7934,15 @@ package body Freeze is
and then Node = Controlling_Argument (Parent (Node))
then
Check_And_Freeze_Type (Designated_Type (Etype (Node)));
+
+ -- An explicit dereference freezes the designated type as well,
+ -- even though that type is not attached to an entity in the
+ -- expression.
+
+ elsif Nkind (Node) in N_Has_Etype
+ and then Nkind (Parent (Node)) = N_Explicit_Dereference
+ then
+ Check_And_Freeze_Type (Designated_Type (Etype (Node)));
end if;
-- No point in posting several errors on the same expression
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-07-07 9:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-07 9:28 [gcc r11-1882] [Ada] Handle explicit dereferences in expression functions 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).