This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
A type that implements interfaces generates internal procedures ("thunks") that access the dispatch table to retrieve the proper operation on a dispatching call. This patch fixes a bug in the handling of these thunks, when one of its formals has a limited view of a type. Usually the presence of such a type forces a delay in generating code for the subprogram, but this delay must not be applied to a thunk. The following must compile quietly: gcc -c p.ads --- with Q; package P is type Instance is new Q.Instance with null record; end P; --- with R; with S; limited with T; package Q is type Instance is new R.Instance and S.Instance with null record; procedure Proc (Self : Instance; Current : T.Instance); end Q; --- package R is type Instance is tagged null record; end R; --- limited with T; package S is type Instance is interface; procedure Proc (Self : Instance; Current : T.Instance) is abstract; end S; --- package T is type Instance is tagged null record; end T; Tested on x86_64-pc-linux-gnu, committed on trunk 2014-10-23 Ed Schonberg <schonberg@adacore.com> * sem_ch6.adb (Process_Formals): A thunk procedure with a parameter of a limited view does not need a freeze node.
Attachment:
difs
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |