[Ada] Crash due to missing freeze nodes in transient scope
The following patch updates the freezing of expressions to insert the generated freeze nodes prior to the expression that produced them when the context is a transient scope within a type initialization procedure. This ensures that the nodes are properly interleaved with respect to the constructs that generated them. 2019-07-01 Hristian Kirtchev <kirtchev@adacore.com> gcc/ada/ * freeze.adb (Freeze_Expression): Remove the horrible useless name hiding of N. Insert the freeze nodes generated by the expression prior to the expression when the nearest enclosing scope is transient. gcc/testsuite/ * gnat.dg/freezing1.adb, gnat.dg/freezing1.ads, gnat.dg/freezing1_pack.adb, gnat.dg/freezing1_pack.ads: New testcase. From-SVN: r272854
Showing
gcc/testsuite/gnat.dg/freezing1.adb
0 → 100644
gcc/testsuite/gnat.dg/freezing1.ads
0 → 100644
gcc/testsuite/gnat.dg/freezing1_pack.adb
0 → 100644
gcc/testsuite/gnat.dg/freezing1_pack.ads
0 → 100644
Please
register
or
sign in
to comment