Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/811391/?format=api
{ "id": 811391, "url": "http://patchwork.ozlabs.org/api/patches/811391/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/20170908085950.GA68784@adacore.com/", "project": { "id": 17, "url": "http://patchwork.ozlabs.org/api/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": "<20170908085950.GA68784@adacore.com>", "list_archive_url": null, "date": "2017-09-08T08:59:50", "name": "[Ada] Small fix for couple of internal glitches with record layout", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "c75c1e3524a690e6e8efcacac59f88484e28ca0d", "submitter": { "id": 4418, "url": "http://patchwork.ozlabs.org/api/people/4418/?format=api", "name": "Arnaud Charlet", "email": "charlet@adacore.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/20170908085950.GA68784@adacore.com/mbox/", "series": [ { "id": 2140, "url": "http://patchwork.ozlabs.org/api/series/2140/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=2140", "date": "2017-09-08T08:59:50", "name": "[Ada] Small fix for couple of internal glitches with record layout", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/2140/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/811391/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/811391/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<gcc-patches-return-461702-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-461702-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=\"xnGbfknn\"; 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 3xpWVl03y9z9sBW\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 8 Sep 2017 19:00:14 +1000 (AEST)", "(qmail 92092 invoked by alias); 8 Sep 2017 08:59:58 -0000", "(qmail 91975 invoked by uid 89); 8 Sep 2017 08:59:57 -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\tFri, 08 Sep 2017 08:59:52 +0000", "from localhost (localhost.localdomain [127.0.0.1])\tby\n\tfiltered-rock.gnat.com (Postfix) with ESMTP id 068C25619D;\n\tFri, 8 Sep 2017 04:59:51 -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\tl8AIhEjjY5Xx; Fri, 8 Sep 2017 04:59:50 -0400 (EDT)", "from tron.gnat.com (tron.gnat.com [205.232.38.10])\tby\n\trock.gnat.com (Postfix) with ESMTP id E7F8A56126;\n\tFri, 8 Sep 2017 04:59:50 -0400 (EDT)", "by tron.gnat.com (Postfix, from userid 4192)\tid E6FD8505;\n\tFri, 8 Sep 2017 04:59:50 -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=vDdERjcEOqlOfU04sSo/j06agbrBs0fQ2/3LAHz3EaSIDXuuT3\n\tmr8YopZ3o6//0zVkhSHjYpeI/rM89TnqFp3MNHJYzKeBiilAuA/tKFh7o1s0z1Mq\n\tWXZbwEig7lEqrgLKGDIkcZe+clYYOleh2KH+E3Ag7QemgjNDYJfCcJ37k=", "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=xrpyBJL+8asGyplOdewV0DkaOfo=; b=xnGbfknnSVc6nc8DWzfX\n\tyXm3rfbFuGs4J/jn1VlZTfTUAxXEIT4bDnkJVoakcxAisTdAHbi6eZvl4IZOZH36\n\tJfTna8zKFgQBfnZV4SQxHCJ1zIEz35F6r6oyJdM2Uy3x8bKtg7G59yixqk6eaQgf\n\tKd5OUOjsrVQ5FSz32ibMuO8=", "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=-10.5 required=5.0 tests=AWL, BAYES_00,\n\tGIT_PATCH_2, GIT_PATCH_3, KAM_ASCII_DIVIDERS,\n\tRCVD_IN_DNSWL_NONE,\n\tSPF_PASS autolearn=ham version=3.3.2 spammy=", "X-HELO": "rock.gnat.com", "Date": "Fri, 8 Sep 2017 04:59:50 -0400", "From": "Arnaud Charlet <charlet@adacore.com>", "To": "gcc-patches@gcc.gnu.org", "Cc": "Eric Botcazou <ebotcazou@adacore.com>", "Subject": "[Ada] Small fix for couple of internal glitches with record layout", "Message-ID": "<20170908085950.GA68784@adacore.com>", "MIME-Version": "1.0", "Content-Type": "multipart/mixed; boundary=\"UugvWAfsgieZRqgk\"", "Content-Disposition": "inline", "User-Agent": "Mutt/1.5.23 (2014-03-12)" }, "content": "This change ensures that (1) -gnatR always displays the record layout that was\nused internally by the compiler for code generation and (2) the record layout\nis fully adjusted internally when the reverse bit order is specified.\n\nNo functional changes expected because the first issue was papering over the\nsecond issue and the second issue was very likely harmless in practice since\nthe normalized position is redundant with the bit offset, which was correct.\n\nTested on x86_64-pc-linux-gnu, committed on trunk\n\n2017-09-08 Eric Botcazou <ebotcazou@adacore.com>\n\n\t* repinfo.adb (List_Record_Info): During first loop,\n\tdo not override the normalized position and first bit\n\tif they have already been set.\tMove fallback code\n\tfor the packed case to the case where it belongs.\n\t* sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order):\n\tAlso adjust the normalized position of components.\n\t(Adjust_Record_For_Reverse_Bit_Order_Ada_95): Likewise.", "diff": "Index: repinfo.adb\n===================================================================\n--- repinfo.adb\t(revision 251863)\n+++ repinfo.adb\t(working copy)\n@@ -894,30 +894,30 @@\n Cfbit := Component_Bit_Offset (Comp);\n \n if Rep_Not_Constant (Cfbit) then\n- UI_Image_Length := 2;\n+ -- If the record is not packed, then we know that all fields\n+ -- whose position is not specified have a starting normalized\n+ -- bit position of zero.\n \n+ if Unknown_Normalized_First_Bit (Comp)\n+ and then not Is_Packed (Ent)\n+ then\n+ Set_Normalized_First_Bit (Comp, Uint_0);\n+ end if;\n+\n+ UI_Image_Length := 2; -- For \"??\" marker\n else\n -- Complete annotation in case not done\n \n- Set_Normalized_Position (Comp, Cfbit / SSU);\n- Set_Normalized_First_Bit (Comp, Cfbit mod SSU);\n+ if Unknown_Normalized_First_Bit (Comp) then\n+ Set_Normalized_Position (Comp, Cfbit / SSU);\n+ Set_Normalized_First_Bit (Comp, Cfbit mod SSU);\n+ end if;\n \n Sunit := Cfbit / SSU;\n UI_Image (Sunit);\n end if;\n \n- -- If the record is not packed, then we know that all fields\n- -- whose position is not specified have a starting normalized\n- -- bit position of zero.\n-\n- if Unknown_Normalized_First_Bit (Comp)\n- and then not Is_Packed (Ent)\n- then\n- Set_Normalized_First_Bit (Comp, Uint_0);\n- end if;\n-\n- Max_Suni_Length :=\n- Natural'Max (Max_Suni_Length, UI_Image_Length);\n+ Max_Suni_Length := Natural'Max (Max_Suni_Length, UI_Image_Length);\n end if;\n \n Next_Component_Or_Discriminant (Comp);\nIndex: sem_ch13.adb\n===================================================================\n--- sem_ch13.adb\t(revision 251866)\n+++ sem_ch13.adb\t(working copy)\n@@ -627,6 +627,7 @@\n end if;\n \n Set_Component_Bit_Offset (Comp, Pos * SSU + NFB);\n+ Set_Normalized_Position (Comp, Pos + NFB / SSU);\n Set_Normalized_First_Bit (Comp, NFB mod SSU);\n end;\n end loop;\n@@ -750,6 +751,9 @@\n (System_Storage_Unit - 1) -\n (Start_Bit + CSZ - 1));\n \n+ Set_Normalized_Position (Comp,\n+ Component_Bit_Offset (Comp) / System_Storage_Unit);\n+\n Set_Normalized_First_Bit (Comp,\n Component_Bit_Offset (Comp) mod System_Storage_Unit);\n end if;\n", "prefixes": [ "Ada" ] }