The following package spec package B is type I is Interface; type C is new I with null record; function M return C; X : I'Class := I'Class (M); end B;
triggers an infinite recursion in GNAT: +===========================GNAT BUG DETECTED==============================+ | 4.4.0 20080409 (experimental) (i686-pc-linux-gnu) Storage_Error stack overflow (or erroneous memory access)| | Error detected at b.ads:5:20 | -- Summary: ICE: converting a concrete type into a classwide interface Product: gcc Version: 4.4.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: ada AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: sam at gcc dot gnu dot org GCC host triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35888