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] |
This patch corrects the insertion of the compiler-generated routine which encapsulates the behavior of post conditions. When a formal parameter is of a packed array type, the compiler creates several helper subtypes and inserts them at the top of the related subprogram declaration list. Since the post conditions may reference formal parameters, the compiler-generated routine _postconditions must be inserted after the last internal declaration at the subprogram level. Tested on x86_64-pc-linux-gnu, committed on trunk 2012-04-02 Hristian Kirtchev <kirtchev@adacore.com> * sem_ch6.adb (Last_Implicit_Declaration): New routine. (Process_PPCs): Insert the body of _postconditions after the last internally generated declaration. This ensures that actual subtypes created for formal parameters are visible and properly frozen as _postconditions may reference them.
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] |