https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70900
--- Comment #3 from Eric Botcazou <ebotcazou at gcc dot gnu.org> --- Author: ebotcazou Date: Mon May 2 20:33:47 2016 New Revision: 235789 URL: https://gcc.gnu.org/viewcvs?rev=235789&root=gcc&view=rev Log: PR ada/70900 Backport from mainline 2016-04-18 Ed Schonberg <schonb...@adacore.com> * sem_ch6.adb (Process_Formals): Do not set a delay freeze on a subprogram that returns a class-wide type, if the subprogram is a compilation unit, because otherwise gigi will treat the subprogram as external, leading to link errors. Modified: branches/gcc-6-branch/gcc/ada/ChangeLog branches/gcc-6-branch/gcc/ada/sem_ch6.adb