summaryrefslogtreecommitdiff
path: root/libgomp/task.c
diff options
context:
space:
mode:
authorBob Duff <duff@adacore.com>2020-02-10 19:21:00 -0500
committerPierre-Marie de Rodat <derodat@adacore.com>2020-06-08 03:50:54 -0400
commitd2f7fa08bd557db89d771b648631bb98c61a631e (patch)
tree85f3a2a14c330404c4592e7b66c3bfddadc5eea3 /libgomp/task.c
parent2f7294f23e87c4e0a48e50814ab7bb9a4a756a9f (diff)
downloadgcc-d2f7fa08bd557db89d771b648631bb98c61a631e.tar.gz
[Ada] gnatbind: Deterministic No_Entry_Calls_In_Elaboration_Code messages
2020-06-08 Bob Duff <duff@adacore.com> gcc/ada/ * bindo-graphs.adb (function Add_Edge): Rename Add_Edge_With_Return to Add_Edge; we can tell it returns because it's a function, and overloading seems appropriate in this case. If Activates_Task=True, and we're not going to add a new edge because an existing Pred-->Succ edge already exists, then set Activates_Task to True on the preexisting edge. This ensures that the message: info: use pragma Restrictions (No_Entry_Calls_In_Elaboration_Code) appears when appropriate, no matter in what order the edges happened to be processed. (procedure Add_Edge): Remove redundant assertions. (Activates_Task): Other kinds of edges can have Activates_Task=True. For example, if we had a With_Edge and then an Invocation_Edge with Activates_Task=True, then the With_Edge has Activates_Task set to True. (Add_Edge_Kind_Check): New procedure to prevent other bugs of this nature. For example, if we were to sometimes call Add_Edge for a Spec_Before_Body_Edge followed by Add_Edge for a With_Edge, and sometimes in the other order, that would cause a similar bug to what we're fixing here. (Set_Is_Recorded_Edge): Val parameter is not used. Get rid of it. (Set_Activates_Task): New procedure to set the Activates_Task flag. * bindo-graphs.ads (Library_Graph_Edge_Kind): Reorder the enumeration literals to facilitate Add_Edge_Kind_Check. * ali.adb (Known_ALI_Lines): The comment about "still available" was wrong. Fix that by erasing the comment, and encoding the relevant information in real code. Take advantage of Ada's full coverage rules by removing "others =>". Also DRY.
Diffstat (limited to 'libgomp/task.c')
0 files changed, 0 insertions, 0 deletions