Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.2/patches/810950/?format=api
{ "id": 810950, "url": "http://patchwork.ozlabs.org/api/1.2/patches/810950/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/20170907100923.GA69520@adacore.com/", "project": { "id": 17, "url": "http://patchwork.ozlabs.org/api/1.2/projects/17/?format=api", "name": "GNU Compiler Collection", "link_name": "gcc", "list_id": "gcc-patches.gcc.gnu.org", "list_email": "gcc-patches@gcc.gnu.org", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20170907100923.GA69520@adacore.com>", "list_archive_url": null, "date": "2017-09-07T10:09:23", "name": "[Ada] Adding switch to disable implicit Elaborate_All in task case", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "e0f49fb0970d809fc50c7b4045826af3dba3ca3f", "submitter": { "id": 4418, "url": "http://patchwork.ozlabs.org/api/1.2/people/4418/?format=api", "name": "Arnaud Charlet", "email": "charlet@adacore.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/20170907100923.GA69520@adacore.com/mbox/", "series": [ { "id": 1972, "url": "http://patchwork.ozlabs.org/api/1.2/series/1972/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=1972", "date": "2017-09-07T10:09:23", "name": "[Ada] Adding switch to disable implicit Elaborate_All in task case", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/1972/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/810950/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/810950/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<gcc-patches-return-461675-incoming=patchwork.ozlabs.org@gcc.gnu.org>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": [ "patchwork-incoming@bilbo.ozlabs.org", "mailing list gcc-patches@gcc.gnu.org" ], "Authentication-Results": [ "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org\n\t(client-ip=209.132.180.131; helo=sourceware.org;\n\tenvelope-from=gcc-patches-return-461675-incoming=patchwork.ozlabs.org@gcc.gnu.org;\n\treceiver=<UNKNOWN>)", "ozlabs.org; dkim=pass (1024-bit key;\n\tunprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org\n\theader.b=\"xPllAa73\"; dkim-atps=neutral", "sourceware.org; auth=none" ], "Received": [ "from sourceware.org (server1.sourceware.org [209.132.180.131])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xnx5D0fs1z9t2c\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 7 Sep 2017 20:09:35 +1000 (AEST)", "(qmail 125003 invoked by alias); 7 Sep 2017 10:09:26 -0000", "(qmail 124275 invoked by uid 89); 7 Sep 2017 10:09:26 -0000", "from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by\n\tsourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP;\n\tThu, 07 Sep 2017 10:09:25 +0000", "from localhost (localhost.localdomain [127.0.0.1])\tby\n\tfiltered-rock.gnat.com (Postfix) with ESMTP id A267F561AA;\n\tThu, 7 Sep 2017 06:09:23 -0400 (EDT)", "from rock.gnat.com ([127.0.0.1])\tby localhost (rock.gnat.com\n\t[127.0.0.1]) (amavisd-new, port 10024)\twith LMTP id\n\tUGkPNbSo0zxm; Thu, 7 Sep 2017 06:09:23 -0400 (EDT)", "from tron.gnat.com (tron.gnat.com\n\t[IPv6:2620:20:4000:0:46a8:42ff:fe0e:e294])\tby rock.gnat.com\n\t(Postfix) with ESMTP id 8EF0356179;\n\tThu, 7 Sep 2017 06:09:23 -0400 (EDT)", "by tron.gnat.com (Postfix, from userid 4192)\tid 8B2404FC;\n\tThu, 7 Sep 2017 06:09:23 -0400 (EDT)" ], "DomainKey-Signature": "a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id\n\t:list-unsubscribe:list-archive:list-post:list-help:sender:date\n\t:from:to:cc:subject:message-id:mime-version:content-type; q=dns;\n\ts=default; b=JyGi26xpGuGLLMqUGuA56Wa+yw0ssB8jSNombTEEUoC2CAgWKZ\n\tLFUHrxlBn6p9tNu/vyr7TwkjPI5nvKusvrDmUgKnkzcPKun0DkFZh0MR7xwnWO2a\n\tNPaaKhZxXCc6tU0x6D8oPtqjfuGNfIL6AweRBcJzYNi4T7zUZ1oO78NII=", "DKIM-Signature": "v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id\n\t:list-unsubscribe:list-archive:list-post:list-help:sender:date\n\t:from:to:cc:subject:message-id:mime-version:content-type; s=\n\tdefault; bh=WnQNhKLfvboHSWkom2zfi6P2yOw=; b=xPllAa73pxyLiKBoxWrn\n\tu4vRo5YefHItQLH9xq6+QCbBtirQVLRCJDU/R8vQEOqdpp7PbOrtP3WSRKj3gr5l\n\tJXxV463xiUMP4g+x9aAb2t1ILjI9ltmj/6lo4LKreI7fui3NAuH2xcQxwaYeJOEn\n\tDk6j8ZYQ4+C7prMv1PoGJkY=", "Mailing-List": "contact gcc-patches-help@gcc.gnu.org; run by ezmlm", "Precedence": "bulk", "List-Id": "<gcc-patches.gcc.gnu.org>", "List-Unsubscribe": "<mailto:gcc-patches-unsubscribe-incoming=patchwork.ozlabs.org@gcc.gnu.org>", "List-Archive": "<http://gcc.gnu.org/ml/gcc-patches/>", "List-Post": "<mailto:gcc-patches@gcc.gnu.org>", "List-Help": "<mailto:gcc-patches-help@gcc.gnu.org>", "Sender": "gcc-patches-owner@gcc.gnu.org", "X-Virus-Found": "No", "X-Spam-SWARE-Status": "No, score=-11.1 required=5.0 tests=BAYES_00, GIT_PATCH_2,\n\tGIT_PATCH_3, KAM_ASCII_DIVIDERS, RCVD_IN_DNSWL_NONE,\n\tSPF_PASS autolearn=ham version=3.3.2 spammy=", "X-HELO": "rock.gnat.com", "Date": "Thu, 7 Sep 2017 06:09:23 -0400", "From": "Arnaud Charlet <charlet@adacore.com>", "To": "gcc-patches@gcc.gnu.org", "Cc": "Javier Miranda <miranda@adacore.com>", "Subject": "[Ada] Adding switch to disable implicit Elaborate_All in task case", "Message-ID": "<20170907100923.GA69520@adacore.com>", "MIME-Version": "1.0", "Content-Type": "multipart/mixed; boundary=\"J/dobhs11T7y2rNN\"", "Content-Disposition": "inline", "User-Agent": "Mutt/1.5.23 (2014-03-12)" }, "content": "This patch adds switch -gnatd.y to disable the generation of\nimplicit Elaborate_All on a package X when a task body calls\na procedure in the same package, and that procedure calls a\nprocedure in another package X.\n\nAs documented in the GNAT User Guide, when sources cannot be\nmodified, the recommended solution is the use of restriction\nNo_Entry_Calls_In_Elaboration_Code. This switch provides a\nway to disable the generation of the implicit Elaborate_All\nwhen that restriction is not applicable to the sources.\n\nThe following test now compiles without errors:\n\nwith Utils;\npackage body Decls is\n procedure Put_Val (Arg : Decls.My_Int) is\n begin\n Utils.Put_Val(Arg);\n end Put_Val;\n\n task body Lib_Task is\n begin\n accept Start;\n Put_Val (2); -- Utils.Put_Val(Arg);\n end Lib_Task;\n\n function Ident (M : My_Int) return My_Int is\n begin\n return M;\n end Ident;\nend Decls;\n\npackage Decls is\n task Lib_Task is\n entry Start;\n end Lib_Task;\n\n type My_Int is new Integer;\n\n function Ident (M : My_Int) return My_Int;\nend Decls;\n\nwith Decls;\nprocedure Main is\nbegin\n Decls.Lib_Task.Start;\nend;\n\nwith Text_IO;\npackage body Utils is\n procedure Put_Val (Arg : Decls.My_Int) is\n begin\n Text_IO.Put_Line (Decls.My_Int'Image (Decls.Ident (Arg)));\n end Put_Val;\nend Utils;\n\nwith Decls;\npackage Utils is\n procedure Put_Val (Arg : Decls.My_Int);\nend Utils;\n\nCommand: gnatmake main.adb -gnatd.y\n\nTested on x86_64-pc-linux-gnu, committed on trunk\n\n2017-09-07 Javier Miranda <miranda@adacore.com>\n\n\t* sem_elab.adb (Check_Task_Activation): Adding switch -gnatd.y to\n\tallow disabling the generation of implicit pragma Elaborate_All\n\ton task bodies.", "diff": "Index: debug.adb\n===================================================================\n--- debug.adb\t(revision 251834)\n+++ debug.adb\t(working copy)\n@@ -115,7 +115,7 @@\n -- d.v\n -- d.w Do not check for infinite loops\n -- d.x No exception handlers\n- -- d.y\n+ -- d.y Disable implicit pragma Elaborate_All on task bodies\n -- d.z Restore previous support for frontend handling of Inline_Always\n \n -- d.A Read/write Aspect_Specifications hash table to tree\n@@ -603,6 +603,12 @@\n -- fully compiled and analyzed, they just get eliminated from the\n -- code generation step.\n \n+ -- d.y Disable implicit pragma Elaborate_All on task bodies. When a task\n+ -- body calls a procedure in the same package, and that procedure\n+ -- calls a procedure in another package, the static elaboration\n+ -- machinery adds an implicit Elaborate_All on the other package. This\n+ -- switch disables the addition of the implicit pragma in such cases.\n+ --\n -- d.z Restore previous front-end support for Inline_Always. In default\n -- mode, for targets that use the GCC back end, Inline_Always is\n -- handled by the back end. Use of this switch restores the previous\nIndex: sem_elab.adb\n===================================================================\n--- sem_elab.adb\t(revision 251834)\n+++ sem_elab.adb\t(working copy)\n@@ -2961,19 +2961,21 @@\n Next_Elmt (Elmt);\n end loop;\n \n- -- For tasks declared in the current unit, trace other calls within\n- -- the task procedure bodies, which are available.\n+ -- For tasks declared in the current unit, trace other calls within the\n+ -- task procedure bodies, which are available.\n \n- In_Task_Activation := True;\n+ if not Debug_Flag_Dot_Y then\n+ In_Task_Activation := True;\n \n- Elmt := First_Elmt (Intra_Procs);\n- while Present (Elmt) loop\n- Ent := Node (Elmt);\n- Check_Internal_Call_Continue (N, Ent, Enclosing, Ent);\n- Next_Elmt (Elmt);\n- end loop;\n+ Elmt := First_Elmt (Intra_Procs);\n+ while Present (Elmt) loop\n+ Ent := Node (Elmt);\n+ Check_Internal_Call_Continue (N, Ent, Enclosing, Ent);\n+ Next_Elmt (Elmt);\n+ end loop;\n \n- In_Task_Activation := False;\n+ In_Task_Activation := False;\n+ end if;\n end Check_Task_Activation;\n \n -------------------------------\nIndex: sem_elab.ads\n===================================================================\n--- sem_elab.ads\t(revision 251834)\n+++ sem_elab.ads\t(working copy)\n@@ -71,7 +71,7 @@\n -- output a warning.\n \n -- For calls to a subprogram in a with'ed unit or a 'Access or variable\n- -- refernece (SPARK mode case), we require that a pragma Elaborate_All\n+ -- reference (SPARK mode case), we require that a pragma Elaborate_All\n -- or pragma Elaborate be present, or that the referenced unit have a\n -- pragma Preelaborate, pragma Pure, or pragma Elaborate_Body. If none\n -- of these conditions is met, then a warning is generated that a pragma\n", "prefixes": [ "Ada" ] }