diff options
author | Bob Duff <duff@adacore.com> | 2024-06-18 12:53:46 -0400 |
---|---|---|
committer | Marc Poulhiès <dkm@gcc.gnu.org> | 2024-07-02 15:20:35 +0200 |
commit | d33104429a6662f33e05b9fcae65c87a87005749 (patch) | |
tree | bbeac5ed71c20d49b1d7a6fc5ba28358b2c21512 /gcc/ada | |
parent | 772fcf4769a4d4e5546039c0174662df1bc86fa4 (diff) | |
download | gcc-d33104429a6662f33e05b9fcae65c87a87005749.zip gcc-d33104429a6662f33e05b9fcae65c87a87005749.tar.gz gcc-d33104429a6662f33e05b9fcae65c87a87005749.tar.bz2 |
ada: Bug box for expression function with list comprehension
GNAT crashes on an iterator with a filter inside an expression function
that is the completion of an earlier spec.
gcc/ada/
* freeze.adb (Freeze_Type_Refs): If Node is in N_Has_Etype,
check that it has had its Etype set, because this can be
called early for expression functions that are completions.
Diffstat (limited to 'gcc/ada')
-rw-r--r-- | gcc/ada/freeze.adb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb index 757c16e..7cf7e84 100644 --- a/gcc/ada/freeze.adb +++ b/gcc/ada/freeze.adb @@ -9137,6 +9137,7 @@ package body Freeze is -- that type is not attached to an entity in the construct. elsif Nkind (Node) in N_Has_Etype + and then Present (Etype (Node)) and then Nkind (Parent (Node)) = N_Iterator_Specification and then Node = Name (Parent (Node)) then |