with Ada.Streams; package pak1 is type T3 is abstract new Ada.Streams.Root_Stream_Type with null record; type T3_access is access T3; end pak1;
with pak1; procedure test is type T1 is tagged null record; type T2 is new T1 with null record; x1: pak1.T3_access; x2: T2; begin T1'Class'Read( x1, x2 ); -- line 10 end; test.adb:10:23: expected type "T1" defined at line 4 test.adb:10:23: found type "T2" defined at line 5 T1'Class'Read is supposed to dispatch on the tag of x2 because x2 belongs to T1'Class. The compiler should accept this program. -- Summary: Rejects legal program involving T'Class'Read Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: ada AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: ludovic at ludovic-brenta dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38327