get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/1.2/patches/810910/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 810910,
    "url": "http://patchwork.ozlabs.org/api/1.2/patches/810910/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/20170907084030.GS2323@tucnak/",
    "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": "<20170907084030.GS2323@tucnak>",
    "list_archive_url": null,
    "date": "2017-09-07T08:40:30",
    "name": "Fix powerpc ICE with __builtin_vec_ld on an array (PR target/82112)",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "0e40aca9778b368628ad022cec63aad7d53e22b7",
    "submitter": {
        "id": 671,
        "url": "http://patchwork.ozlabs.org/api/1.2/people/671/?format=api",
        "name": "Jakub Jelinek",
        "email": "jakub@redhat.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/20170907084030.GS2323@tucnak/mbox/",
    "series": [
        {
            "id": 1945,
            "url": "http://patchwork.ozlabs.org/api/1.2/series/1945/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=1945",
            "date": "2017-09-07T08:40:30",
            "name": "Fix powerpc ICE with __builtin_vec_ld on an array (PR target/82112)",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/1945/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/810910/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/810910/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<gcc-patches-return-461662-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-461662-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=\"BV/O/YQp\"; dkim-atps=neutral",
            "sourceware.org; auth=none",
            "ext-mx09.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com",
            "ext-mx09.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=jakub@redhat.com"
        ],
        "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 3xnv6s55G4z9sRV\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu,  7 Sep 2017 18:40:51 +1000 (AEST)",
            "(qmail 125634 invoked by alias); 7 Sep 2017 08:40:41 -0000",
            "(qmail 119737 invoked by uid 89); 7 Sep 2017 08:40:38 -0000",
            "from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by\n\tsourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP;\n\tThu, 07 Sep 2017 08:40:36 +0000",
            "from smtp.corp.redhat.com\n\t(int-mx04.intmail.prod.int.phx2.redhat.com\n\t[10.5.11.14])\t(using TLSv1.2 with cipher AECDH-AES256-SHA\n\t(256/256 bits))\t(No client certificate requested)\tby\n\tmx1.redhat.com (Postfix) with ESMTPS id 4265D4E4CA;\n\tThu,  7 Sep 2017 08:40:35 +0000 (UTC)",
            "from tucnak.zalov.cz (ovpn-116-33.ams2.redhat.com\n\t[10.36.116.33])\tby smtp.corp.redhat.com (Postfix) with ESMTPS\n\tid DA23461B70; Thu,  7 Sep 2017 08:40:34 +0000 (UTC)",
            "from tucnak.zalov.cz (localhost [127.0.0.1])\tby tucnak.zalov.cz\n\t(8.15.2/8.15.2) with ESMTP id v878eWcl014576;\n\tThu, 7 Sep 2017 10:40:32 +0200",
            "(from jakub@localhost)\tby tucnak.zalov.cz (8.15.2/8.15.2/Submit)\n\tid v878eU3Q014575; Thu, 7 Sep 2017 10:40:30 +0200"
        ],
        "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:reply-to:mime-version\n\t:content-type; q=dns; s=default; b=HSWpUwaapr6c1Xx83mrY0rHsz0K6u\n\tgpvt3hT1FauQ+bUc/DR5c/9B+1x2ibWyyMtFN2V39nnXNSemk/TfJ49BYjA3gtO+\n\t/NSB72W3CqbhBQKY+FsaU+27dgdRC+bQerntwWDS+3XLO4GMObbmIUtkJFNc/mb5\n\t5iHosQ4aSJILgc=",
        "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:reply-to:mime-version\n\t:content-type; s=default; bh=2x4UVcMkw47mc5xdk2aPv1azP4M=; b=BV/\n\tO/YQpBdyXm/p0YuyK0pkboif8GUISSXZlTThfoRkwTeWVRN13coWnU8fLf0Q2TDn\n\tjLWd3SjKTZ+/xUT1HFKKMPi6+LdE+uEIKzpcbVqgBjHXFK3QmhxdISeE+x7vF7fa\n\tA4jJ82pxJGbm+n39zO4kMKS3e4Afpd4tTu3QtQ3s=",
        "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.9 required=5.0 tests=BAYES_00, GIT_PATCH_2,\n\tGIT_PATCH_3, RP_MATCHES_RCVD,\n\tSPF_HELO_PASS autolearn=ham version=3.3.2 spammy=",
        "X-HELO": "mx1.redhat.com",
        "DMARC-Filter": "OpenDMARC Filter v1.3.2 mx1.redhat.com 4265D4E4CA",
        "Date": "Thu, 7 Sep 2017 10:40:30 +0200",
        "From": "Jakub Jelinek <jakub@redhat.com>",
        "To": "Segher Boessenkool <segher@kernel.crashing.org>",
        "Cc": "David Edelsohn <dje.gcc@gmail.com>, gcc-patches@gcc.gnu.org",
        "Subject": "[PATCH] Fix powerpc ICE with __builtin_vec_ld on an array (PR\n\ttarget/82112)",
        "Message-ID": "<20170907084030.GS2323@tucnak>",
        "Reply-To": "Jakub Jelinek <jakub@redhat.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=us-ascii",
        "Content-Disposition": "inline",
        "User-Agent": "Mutt/1.7.1 (2016-10-04)",
        "X-IsSubscribed": "yes"
    },
    "content": "Hi!\n\nThe C and C++ FE handle resolve_overloaded_builtin differently, the C FE\ncalls it when e.g. array-to-pointer and function-to-pointer conversions\nare already done on the arguments, while C++ FE does that only much later.\nThe c-common code e.g. for __sync/__atomic builtins deals with\nthat e.g. by:\n  if (TREE_CODE (type) == ARRAY_TYPE)\n    {\n      /* Force array-to-pointer decay for C++.  */\n      gcc_assert (c_dialect_cxx());\n      (*params)[0] = default_conversion ((*params)[0]);\n      type = TREE_TYPE ((*params)[0]);\n    }\nwhile the rs6000 md hook uses default_conversion only in one spot (the\ngeneric handling), but for vec_ld and vec_st does something on its own.\nWhat is even worse is that for vec_ld, it does that too late, there is\na fold_convert in between for the case where the element type is\nqualified, and that only works if the argument is pointer, not array\n(in which case it ICEs).\nSo, the following patch moves the vec_ld conversion earlier and for both\nvec_ld and vec_st uses what c-common as well as later\naltivec_resolve_overloaded_builtin uses.\n\nBootstrapped/regtested on powerpc64-linux (regtest with {,-m32}), ok for\ntrunk?\n\n2017-09-07  Jakub Jelinek  <jakub@redhat.com>\n\n\tPR target/82112\n\t* config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): For\n\tALTIVEC_BUILTIN_VEC_LD if arg1 has array type call default_conversion\n\ton it early, rather than manual conversion late.  For\n\tALTIVEC_BUILTIN_VEC_ST if arg2 has array type call default_conversion\n\tinstead of performing manual conversion.\n\n\t* g++.dg/ext/altivec-18.C: New test.\n\n\n\tJakub",
    "diff": "--- gcc/config/rs6000/rs6000-c.c.jj\t2017-09-01 09:26:55.000000000 +0200\n+++ gcc/config/rs6000/rs6000-c.c\t2017-09-06 15:43:11.719590365 +0200\n@@ -6478,7 +6478,14 @@ altivec_resolve_overloaded_builtin (loca\n \n       /* Strip qualifiers like \"const\" from the pointer arg.  */\n       tree arg1_type = TREE_TYPE (arg1);\n-      if (!POINTER_TYPE_P (arg1_type) && TREE_CODE (arg1_type) != ARRAY_TYPE)\n+      if (TREE_CODE (arg1_type) == ARRAY_TYPE)\n+\t{\n+\t  /* Force array-to-pointer decay for C++.  */\n+\t  gcc_assert (c_dialect_cxx ());\n+\t  arg1 = default_conversion (arg1);\n+\t  arg1_type = TREE_TYPE (arg1);\n+\t}\n+      if (!POINTER_TYPE_P (arg1_type))\n \tgoto bad;\n \n       tree inner_type = TREE_TYPE (arg1_type);\n@@ -6498,15 +6505,6 @@ altivec_resolve_overloaded_builtin (loca\n \t  if (!ptrofftype_p (TREE_TYPE (arg0)))\n \t    arg0 = build1 (NOP_EXPR, sizetype, arg0);\n \n-\t  tree arg1_type = TREE_TYPE (arg1);\n-\t  if (TREE_CODE (arg1_type) == ARRAY_TYPE)\n-\t    {\n-\t      arg1_type = TYPE_POINTER_TO (TREE_TYPE (arg1_type));\n-\t      tree const0 = build_int_cstu (sizetype, 0);\n-\t      tree arg1_elt0 = build_array_ref (loc, arg1, const0);\n-\t      arg1 = build1 (ADDR_EXPR, arg1_type, arg1_elt0);\n-\t    }\n-\n \t  tree addr = fold_build2_loc (loc, POINTER_PLUS_EXPR, arg1_type,\n \t\t\t\t       arg1, arg0);\n \t  tree aligned = fold_build2_loc (loc, BIT_AND_EXPR, arg1_type, addr,\n@@ -6563,10 +6561,10 @@ altivec_resolve_overloaded_builtin (loca\n \t  tree arg2_type = TREE_TYPE (arg2);\n \t  if (TREE_CODE (arg2_type) == ARRAY_TYPE)\n \t    {\n-\t      arg2_type = TYPE_POINTER_TO (TREE_TYPE (arg2_type));\n-\t      tree const0 = build_int_cstu (sizetype, 0);\n-\t      tree arg2_elt0 = build_array_ref (loc, arg2, const0);\n-\t      arg2 = build1 (ADDR_EXPR, arg2_type, arg2_elt0);\n+\t      /* Force array-to-pointer decay for C++.  */\n+\t      gcc_assert (c_dialect_cxx ());\n+\t      arg2 = default_conversion (arg2);\n+\t      arg2_type = TREE_TYPE (arg2);\n \t    }\n \n \t  /* Find the built-in to make sure a compatible one exists; if not\n--- gcc/testsuite/g++.dg/ext/altivec-18.C.jj\t2017-09-06 15:45:00.673295858 +0200\n+++ gcc/testsuite/g++.dg/ext/altivec-18.C\t2017-09-06 15:45:36.274872713 +0200\n@@ -0,0 +1,14 @@\n+// PR target/82112\n+// { dg-do compile { target powerpc*-*-* } }\n+// { dg-require-effective-target powerpc_altivec_ok }\n+// { dg-options \"-save-temps -maltivec\" }\n+\n+#include <altivec.h>\n+\n+__attribute__((aligned (16))) extern const unsigned char c[16];\n+\n+void\n+foo (void)\n+{\n+  vec_ld (0, c);\n+}\n",
    "prefixes": []
}