[Ada] Spurious error on Ghost null procedure
This patch modifies the analysis (which is really expansion) of null procedures to set the Ghost mode of the spec when the null procedure acts as a completion. This ensures that all nodes and entities generated by the expansion are marked as Ghost, and provide a proper context for references to Ghost entities. 2018-11-14 Hristian Kirtchev <kirtchev@adacore.com> gcc/ada/ * sem_ch6.adb (Analyze_Null_Procedure): Capture Ghost and SPARK-related global state at the start of the routine. Set the Ghost mode of the completed spec if any. Restore the saved Ghost and SPARK-related global state on exit from the routine. gcc/testsuite/ * gnat.dg/ghost1.adb, gnat.dg/ghost1.ads: New testcase. From-SVN: r266132
Showing
gcc/testsuite/gnat.dg/ghost1.adb
0 → 100644
gcc/testsuite/gnat.dg/ghost1.ads
0 → 100644
Please
register
or
sign in
to comment