expr_func7.adb
94 Bytes
-
[Ada] Crash on expression function and tagged types · 084e3bd1
This patch fixes a compiler abort on an expression function whose expression includes tagged types that have not been frozen before the generated body of the function is analyzed, even though that body is inserted at the end of the current declarative part. 2018-08-21 Ed Schonberg <schonberg@adacore.com> gcc/ada/ * sem_ch6.adb (Analyze_Subprogram_Body_Helper, Mask_Type): Refine the handling of freezing types for expression functions that are not completions, when analyzing the generated body for the function: the body is inserted at the end of the enclosing declarative part, and its analysis may freeze types declared in the same scope that have not been frozen yet. gcc/testsuite/ * gnat.dg/expr_func7.adb, gnat.dg/expr_func7.ads: New testcase. From-SVN: r263735
Ed Schonberg committed