Linking of an enabled ghost unit which requires a finalizer lead to an error, as the name generated by the binder for calling the finalizer was not the same as the name chosen by the compiler. Now fixed. Tested on x86_64-pc-linux-gnu, committed on trunk 2019-07-23 Yannick Moy gcc/ada/ * exp_ch7.adb (Create_Finalizer): Force finalizer not to be Ghost enabled. * exp_dbug.adb (Get_External_Name): Explain special case of Ghost finalizer. gcc/testsuite/ * gnat.dg/ghost6.adb, gnat.dg/ghost6_pkg.ads: New testcase.