Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/806544/?format=api
{ "id": 806544, "url": "http://patchwork.ozlabs.org/api/patches/806544/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/alpine.LSU.2.20.1708281340340.14191@zhemvz.fhfr.qr/", "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": "<alpine.LSU.2.20.1708281340340.14191@zhemvz.fhfr.qr>", "list_archive_url": null, "date": "2017-08-28T11:41:28", "name": "Fix PR81977", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "c2f8381dd7f2c9760336a3fde4b077f05dd82914", "submitter": { "id": 4338, "url": "http://patchwork.ozlabs.org/api/people/4338/?format=api", "name": "Richard Biener", "email": "rguenther@suse.de" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/alpine.LSU.2.20.1708281340340.14191@zhemvz.fhfr.qr/mbox/", "series": [ { "id": 145, "url": "http://patchwork.ozlabs.org/api/series/145/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=145", "date": "2017-08-28T11:41:28", "name": "Fix PR81977", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/145/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/806544/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/806544/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<gcc-patches-return-461007-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-461007-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=\"NI7oOJ9g\"; 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 3xgqc81dZrz9sN7\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 28 Aug 2017 21:41:43 +1000 (AEST)", "(qmail 52474 invoked by alias); 28 Aug 2017 11:41:34 -0000", "(qmail 52458 invoked by uid 89); 28 Aug 2017 11:41:32 -0000", "from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by\n\tsourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP;\n\tMon, 28 Aug 2017 11:41:30 +0000", "from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254])\tby\n\tmx1.suse.de (Postfix) with ESMTP id BBEA4AB1E\tfor\n\t<gcc-patches@gcc.gnu.org>; Mon, 28 Aug 2017 11:41:28 +0000 (UTC)" ], "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:subject:message-id:mime-version:content-type; q=dns; s=\n\tdefault; b=bakwTPPSSq163M8N3jZ8wdVxH6JBKJR8QWDJE4t7CaSqZ7L8z0mL/\n\tdL2xR9IRr2dzsxBRgMA5fOnAHwlFgmo/WZg+/xzj8ASuF2K6LHYp6klxjr+MXtal\n\tkEW+l+PTzS/k32eZlFoIub1ZtGqSiGOvp3TJR0/l2u9dDppU9+PwWI=", "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:subject:message-id:mime-version:content-type; s=\n\tdefault; bh=x/kSq1XGPkFzhkGQo4yM9uZUpXI=; b=NI7oOJ9gETnlJzAQ2Ofw\n\tIF4zIj5zGbqd0o5IRx2lHpqOb1C4s2FOqBaveOdZlVWnJFLdSEYzYPwbJCL9uTIW\n\tIWkT/tFfS7ljHTWpkFcwf+U9CkBIeVqf0cEZv1oZCgAH6VGPysWdHsJaTrIUMdEj\n\ti73Ogpf1+GTtcgywOt+CeCE=", "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, RP_MATCHES_RCVD,\n\tSPF_PASS autolearn=ham version=3.3.2 spammy=", "X-HELO": "mx1.suse.de", "Date": "Mon, 28 Aug 2017 13:41:28 +0200 (CEST)", "From": "Richard Biener <rguenther@suse.de>", "To": "gcc-patches@gcc.gnu.org", "Subject": "[PATCH] Fix PR81977", "Message-ID": "<alpine.LSU.2.20.1708281340340.14191@zhemvz.fhfr.qr>", "User-Agent": "Alpine 2.20 (LSU 67 2015-01-07)", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=US-ASCII" }, "content": "The following fixes a failure to account for lhs_offset (or rather\nto consistently use the same offset in op0 and off).\n\nBootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk.\n\nRichard.\n\n2017-08-28 Richard Biener <rguenther@suse.de>\n\n\tPR tree-optimization/81977\n\t* tree-ssa-sccvn.c (vn_reference_lookup_3): Fix look through\n\tmemcpy.\n\n\t* g++.dg/torture/pr81977.C: New testcase.", "diff": "Index: gcc/tree-ssa-sccvn.c\n===================================================================\n--- gcc/tree-ssa-sccvn.c\t(revision 251377)\n+++ gcc/tree-ssa-sccvn.c\t(working copy)\n@@ -2334,7 +2334,7 @@ vn_reference_lookup_3 (ao_ref *ref, tree\n memset (&op, 0, sizeof (op));\n op.type = vr->type;\n op.opcode = MEM_REF;\n- op.op0 = build_int_cst (ptr_type_node, at - rhs_offset);\n+ op.op0 = build_int_cst (ptr_type_node, at - lhs_offset + rhs_offset);\n op.off = at - lhs_offset + rhs_offset;\n vr->operands[0] = op;\n op.type = TREE_TYPE (rhs);\nIndex: gcc/testsuite/g++.dg/torture/pr81977.C\n===================================================================\n--- gcc/testsuite/g++.dg/torture/pr81977.C\t(nonexistent)\n+++ gcc/testsuite/g++.dg/torture/pr81977.C\t(working copy)\n@@ -0,0 +1,55 @@\n+/* { dg-do run } */\n+/* { dg-require-effective-target int32plus } */\n+\n+#include <cstdint>\n+\n+typedef struct\n+{\n+ uint16_t x ;\n+ uint16_t y ;\n+ uint64_t z ;\n+} __attribute__((packed, aligned(1))) TestMsgType;\n+\n+struct Payload\n+{\n+ uint16_t header_info[2];\n+ TestMsgType _pref;\n+ void Pack(uint8_t *buffer)\n+ {\n+ __builtin_memcpy(buffer, &_pref, sizeof(_pref));\n+ }\n+ void UnPack(uint8_t *buffer)\n+ {\n+ __builtin_memcpy(&_pref, buffer, sizeof(_pref));\n+ }\n+};\n+\n+\n+struct Msg\n+{\n+ Payload _payload;\n+ void Pack(uint8_t *buffer)\n+ {\n+ _payload.Pack(buffer);\n+ }\n+\n+ void UnPack(uint8_t *buffer)\n+ {\n+ _payload.UnPack(buffer);\n+ }\n+};\n+\n+int main()\n+{\n+ uint8_t * buffer = new uint8_t [30];\n+ Msg msg;\n+ Msg msg1;\n+ msg._payload._pref.x = 0xabcd;\n+ msg._payload._pref.y = 0xa;\n+ msg._payload._pref.z = 0x0001020304051617;\n+ msg.Pack(&buffer[0]);\n+ msg1.UnPack(&buffer[0]);\n+ if (msg1._payload._pref.x != 0xabcd)\n+ __builtin_abort ();\n+ delete [] buffer;\n+}\n", "prefixes": [] }