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]

[Ada] Always require an elaboration counter when preserving control flow


When control flow preservation is requested, we want to be explicit
about the units elaboration order in a partition, and we need to have
the elaboration counter available for that. This patch ensures we do,
even in circumstances where we are otherwise allowed to omit the
elaboration counter, e.g. under control of a No_Elaboration_Code pragma.

Compiling the code below:

   pragma Restrictions (No_Elaboration_Code);
   package Noelab is
     type Myint is new integer;
   end;

With -fpreserve-control-flow is expected to produce a "noelab_E"
counter, not there in absence of the option.

Tested on x86_64-pc-linux-gnu, committed on trunk

2016-04-19  Olivier Hainque  <hainque@adacore.com>

	* sem_util.adb (Build_Elaboration_Entity): Always request an
	elab counter when preserving control-flow.

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]