[{"id":1764790,"web_url":"http://patchwork.ozlabs.org/comment/1764790/","msgid":"<alpine.DEB.2.20.1709071532100.21759@digraph.polyomino.org.uk>","list_archive_url":null,"date":"2017-09-07T15:35:00","subject":"Re: [PATCH] Fix atomic builtins on arrays (PR target/82112)","submitter":{"id":4349,"url":"http://patchwork.ozlabs.org/api/people/4349/","name":"Joseph Myers","email":"joseph@codesourcery.com"},"content":"On Thu, 7 Sep 2017, Jakub Jelinek wrote:\n\n> Hi!\n> \n> The powerpc patch I've just posted led me to try __atomic_* builtins\n> on arrays as in the testcase below.  While it works fine if the\n> array is just on the first argument or in C, in C++ for arrays in 2nd\n> or 3rd argument the atomics are rejected (complaining that the argument\n> is not a pointer), while we should really have performed array-to-pointer\n> conversion first.\n> \n> Fixed thusly, bootstrapped/regtested on powerpc64-linux, ok for trunk?\n\nI don't think either the existing or new assertion that arrays only occur \nin C++ are correct.  E.g. build the following with -std=gnu90 so \nnon-lvalue arrays don't decay to pointers.  (ICEs on such an assertion in \nget_atomic_generic_size with a trunk build as of a few days ago.)\n\nstruct s { int c[10]; };\nstruct s f (void);\nvoid\ng (void)\n{\n  __atomic_load ( f().c, f().c, __ATOMIC_ACQUIRE);\n}\n\n(I think C90 non-lvalue arrays there are most appropriately an error, \nrather than attempting to make them decay to pointers after all.)","headers":{"Return-Path":"<gcc-patches-return-461689-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-461689-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=\"eqTPOFIA\"; 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 3xp4KB4QTXz9t2r\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri,  8 Sep 2017 01:35:26 +1000 (AEST)","(qmail 1194 invoked by alias); 7 Sep 2017 15:35:16 -0000","(qmail 1172 invoked by uid 89); 7 Sep 2017 15:35:16 -0000","from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131)\n\tby sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with\n\tESMTP; Thu, 07 Sep 2017 15:35:10 +0000","from nat-ies.mentorg.com ([192.94.31.2]\n\thelo=svr-ies-mbx-01.mgc.mentorg.com)\tby relay1.mentorg.com\n\twith esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256)\tid\n\t1dpypf-0002wf-MV from joseph_myers@mentor.com ;\n\tThu, 07 Sep 2017 08:35:07 -0700","from digraph.polyomino.org.uk (137.202.0.87) by\n\tsvr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) with Microsoft\n\tSMTP Server (TLS) id 15.0.1263.5; Thu, 7 Sep 2017 16:35:04 +0100","from jsm28 (helo=localhost)\tby digraph.polyomino.org.uk with\n\tlocal-esmtp (Exim 4.86_2)\t(envelope-from\n\t<joseph@codesourcery.com>)\tid 1dpypY-0006wm-72;\n\tThu, 07 Sep 2017 15:35:00 +0000"],"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:in-reply-to:message-id:references\n\t:mime-version:content-type; q=dns; s=default; b=accF/2TucFsGaBEo\n\tBx0a5HmSKqO7NBS4ACrfmIA8ISfhpY5D/sx/NKXF22h/l5YKk0GzNoIC4BigTi/j\n\tqG2ib8/ZOPBoGaA6Dkqz9lSoZIfPrGPjaF90FthXa4lbzsbSfRSr2HByjXVJuURf\n\tTIi33V6zJeztIBUfoOUTLe+kkcI=","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:in-reply-to:message-id:references\n\t:mime-version:content-type; s=default; bh=v4zRtIUhu99EDPPE3eCbyp\n\t1n5sg=; b=eqTPOFIAYqeQDGNqOGY3pJ9eH4zAFINI1g2sRcZIvl3LyBlrfsrQqJ\n\tJFBapEvfVnP2vHxLBxMUFABuqYOVKJnxA7qOeSQ6nys2jfcFIQJjvZGbTWuk4Mxd\n\tYFQOAvB99fmADbwj8RlTgzdHugeDcvk1B1oO8ifaFQREVvpJhM2TQ=","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=-2.0 required=5.0 tests=AWL, BAYES_00,\n\tRCVD_IN_DNSWL_NONE, SPF_PASS,\n\tURIBL_RED autolearn=ham version=3.3.2 spammy=","X-HELO":"relay1.mentorg.com","Date":"Thu, 7 Sep 2017 15:35:00 +0000","From":"Joseph Myers <joseph@codesourcery.com>","To":"Jakub Jelinek <jakub@redhat.com>","CC":"Marek Polacek <polacek@redhat.com>, Jason Merrill <jason@redhat.com>,\n\t<gcc-patches@gcc.gnu.org>","Subject":"Re: [PATCH] Fix atomic builtins on arrays (PR target/82112)","In-Reply-To":"<20170907084344.GT2323@tucnak>","Message-ID":"<alpine.DEB.2.20.1709071532100.21759@digraph.polyomino.org.uk>","References":"<20170907084344.GT2323@tucnak>","User-Agent":"Alpine 2.20 (DEB 67 2015-01-07)","MIME-Version":"1.0","Content-Type":"text/plain; charset=\"US-ASCII\"","X-ClientProxiedBy":"svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To\n\tsvr-ies-mbx-01.mgc.mentorg.com (139.181.222.1)"}},{"id":1764943,"web_url":"http://patchwork.ozlabs.org/comment/1764943/","msgid":"<20170907210945.GX2323@tucnak>","list_archive_url":null,"date":"2017-09-07T21:09:45","subject":"Re: [PATCH] Fix atomic builtins on arrays (PR target/82112)","submitter":{"id":671,"url":"http://patchwork.ozlabs.org/api/people/671/","name":"Jakub Jelinek","email":"jakub@redhat.com"},"content":"On Thu, Sep 07, 2017 at 03:35:00PM +0000, Joseph Myers wrote:\n> > The powerpc patch I've just posted led me to try __atomic_* builtins\n> > on arrays as in the testcase below.  While it works fine if the\n> > array is just on the first argument or in C, in C++ for arrays in 2nd\n> > or 3rd argument the atomics are rejected (complaining that the argument\n> > is not a pointer), while we should really have performed array-to-pointer\n> > conversion first.\n> > \n> > Fixed thusly, bootstrapped/regtested on powerpc64-linux, ok for trunk?\n> \n> I don't think either the existing or new assertion that arrays only occur \n> in C++ are correct.  E.g. build the following with -std=gnu90 so \n> non-lvalue arrays don't decay to pointers.  (ICEs on such an assertion in \n> get_atomic_generic_size with a trunk build as of a few days ago.)\n> \n> struct s { int c[10]; };\n> struct s f (void);\n> void\n> g (void)\n> {\n>   __atomic_load ( f().c, f().c, __ATOMIC_ACQUIRE);\n> }\n> \n> (I think C90 non-lvalue arrays there are most appropriately an error, \n> rather than attempting to make them decay to pointers after all.)\n\nAh, ok, so like this instead?\n\n2017-09-07  Jakub Jelinek  <jakub@redhat.com>\n\n\tPR target/82112\n\t* c-common.c (sync_resolve_size): Instead of c_dialect_cxx ()\n\tassertion check that in the condition.\n\t(get_atomic_generic_size): Likewise.  Before testing if parameter\n\thas pointer type, if it has array type, call for C++\n\tdefault_conversion to perform array-to-pointer conversion.\n\n\t* c-c++-common/pr82112.c: New test.\n\t* gcc.dg/pr82112.c: New test.\n\n--- gcc/c-family/c-common.c.jj\t2017-09-06 16:23:25.285903973 +0200\n+++ gcc/c-family/c-common.c\t2017-09-07 22:55:18.836731301 +0200\n@@ -6478,10 +6478,9 @@ sync_resolve_size (tree function, vec<tr\n     }\n \n   argtype = type = TREE_TYPE ((*params)[0]);\n-  if (TREE_CODE (type) == ARRAY_TYPE)\n+  if (TREE_CODE (type) == ARRAY_TYPE && c_dialect_cxx ())\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     }\n@@ -6646,10 +6645,9 @@ get_atomic_generic_size (location_t loc,\n \n   /* Get type of first parameter, and determine its size.  */\n   type_0 = TREE_TYPE ((*params)[0]);\n-  if (TREE_CODE (type_0) == ARRAY_TYPE)\n+  if (TREE_CODE (type_0) == ARRAY_TYPE && c_dialect_cxx ())\n     {\n       /* Force array-to-pointer decay for C++.  */\n-      gcc_assert (c_dialect_cxx());\n       (*params)[0] = default_conversion ((*params)[0]);\n       type_0 = TREE_TYPE ((*params)[0]);\n     }\n@@ -6688,6 +6686,12 @@ get_atomic_generic_size (location_t loc,\n       /* __atomic_compare_exchange has a bool in the 4th position, skip it.  */\n       if (n_param == 6 && x == 3)\n         continue;\n+      if (TREE_CODE (type) == ARRAY_TYPE && c_dialect_cxx ())\n+\t{\n+\t  /* Force array-to-pointer decay for C++.  */\n+\t  (*params)[x] = default_conversion ((*params)[x]);\n+\t  type = TREE_TYPE ((*params)[x]);\n+\t}\n       if (!POINTER_TYPE_P (type))\n \t{\n \t  error_at (loc, \"argument %d of %qE must be a pointer type\", x + 1,\n--- gcc/testsuite/c-c++-common/pr82112.c.jj\t2017-09-07 22:54:39.755185278 +0200\n+++ gcc/testsuite/c-c++-common/pr82112.c\t2017-09-07 22:54:39.755185278 +0200\n@@ -0,0 +1,13 @@\n+/* PR target/82112 */\n+/* { dg-do compile } */\n+\n+int c[10], d[10], e[10], f[10], g[10], h[10], i[10], j[10], k[10], l[10];\n+\n+void\n+foo (void)\n+{\n+  __atomic_load (c, d, __ATOMIC_ACQUIRE);\n+  __atomic_store (e, f, __ATOMIC_SEQ_CST);\n+  __atomic_exchange (g, h, i, __ATOMIC_RELAXED);\n+  __atomic_compare_exchange (j, k, l, 1, __ATOMIC_RELAXED, __ATOMIC_RELAXED);\n+}\n--- gcc/testsuite/gcc.dg/pr82112.c.jj\t2017-09-07 22:55:59.917254104 +0200\n+++ gcc/testsuite/gcc.dg/pr82112.c\t2017-09-07 23:07:27.635458611 +0200\n@@ -0,0 +1,21 @@\n+/* PR target/82112 */\n+/* { dg-do compile } */\n+/* { dg-options \"-std=gnu90\" } */\n+\n+struct S { int a[10]; } bar (void);\n+int b, c;\n+\n+void\n+foo (void)\n+{\n+  __atomic_load (bar ().a, &b, __ATOMIC_ACQUIRE);\t/* { dg-error \"argument 1 of .__atomic_load. must be a non-void pointer type\" } */\n+  __atomic_load (&b, bar ().a, __ATOMIC_ACQUIRE);\t/* { dg-error \"argument 2 of .__atomic_load. must be a pointer type\" } */\n+  __atomic_store (bar ().a, &b, __ATOMIC_SEQ_CST);\t/* { dg-error \"argument 1 of .__atomic_store. must be a non-void pointer type\" } */\n+  __atomic_store (&b, bar ().a, __ATOMIC_SEQ_CST);\t/* { dg-error \"argument 2 of .__atomic_store. must be a pointer type\" } */\n+  __atomic_exchange (bar ().a, &b, &c, __ATOMIC_RELAXED);\t/* { dg-error \"argument 1 of .__atomic_exchange. must be a non-void pointer type\" } */\n+  __atomic_exchange (&b, bar ().a, &c, __ATOMIC_RELAXED);\t/* { dg-error \"argument 2 of .__atomic_exchange. must be a pointer type\" } */\n+  __atomic_exchange (&b, &c, bar ().a, __ATOMIC_RELAXED);\t/* { dg-error \"argument 3 of .__atomic_exchange. must be a pointer type\" } */\n+  __atomic_compare_exchange (bar ().a, &b, &c, 1, __ATOMIC_RELAXED, __ATOMIC_RELAXED);\t/* { dg-error \"argument 1 of .__atomic_compare_exchange. must be a non-void pointer type\" } */\n+  __atomic_compare_exchange (&b, bar ().a, &c, 1, __ATOMIC_RELAXED, __ATOMIC_RELAXED);\t/* { dg-error \"argument 2 of .__atomic_compare_exchange. must be a pointer type\" } */\n+  __atomic_compare_exchange (&b, &c, bar ().a, 1, __ATOMIC_RELAXED, __ATOMIC_RELAXED);\t/* { dg-error \"argument 3 of .__atomic_compare_exchange. must be a pointer type\" } */\n+}\n\n\n\tJakub","headers":{"Return-Path":"<gcc-patches-return-461696-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-461696-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=\"TJG2MKw9\"; dkim-atps=neutral","sourceware.org; auth=none","ext-mx05.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx05.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 3xpClV1kpjz9rxj\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri,  8 Sep 2017 07:10:11 +1000 (AEST)","(qmail 35586 invoked by alias); 7 Sep 2017 21:10:00 -0000","(qmail 35450 invoked by uid 89); 7 Sep 2017 21:10:00 -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 21:09:54 +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 C9E9F3E6;\n\tThu,  7 Sep 2017 21:09:52 +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 CB69F5D973; Thu,  7 Sep 2017 21:09:49 +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 v87L9lTD029001;\n\tThu, 7 Sep 2017 23:09:47 +0200","(from jakub@localhost)\tby tucnak.zalov.cz (8.15.2/8.15.2/Submit)\n\tid v87L9j6G029000; Thu, 7 Sep 2017 23:09:45 +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:references:mime-version\n\t:content-type:in-reply-to; q=dns; s=default; b=rgATfG8evV2f2DgHG\n\tcOIiQQJuRx15SatBnmjWDQ8eBn/xrpLm3UvpSY07CYbh09TAaCzOGVsvYzrySycr\n\tmi/NVugqh9e1gGkGLQp1uuHpLAe/a+QLjSIFOC24cEb+yOQ2icz4LK6wnvLtkQl4\n\t9gQsmQD7tSaG0BveuyT6DNDIjY=","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:references:mime-version\n\t:content-type:in-reply-to; s=default; bh=xFhFo5eNWgmdk1VhhhR4f48\n\t4clU=; b=TJG2MKw9s2iyYnlexitux6rtSc0f7cNF+gvcSAL8VOO/Iif5pmpTQMN\n\t/5YGFamEtx9k3Ik7OZqnyGZVuo6Ix3l4Z+2jMgnEEEu1Ybx+zKJzG4MkIuTuByNV\n\tzFugJ9KLdjc4UfcExpGZw2O0pVLe/OC+PVDMPg/K6s+Yl2t3tC6I=","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 C9E9F3E6","Date":"Thu, 7 Sep 2017 23:09:45 +0200","From":"Jakub Jelinek <jakub@redhat.com>","To":"Joseph Myers <joseph@codesourcery.com>","Cc":"Marek Polacek <polacek@redhat.com>, Jason Merrill <jason@redhat.com>,\n\tgcc-patches@gcc.gnu.org","Subject":"Re: [PATCH] Fix atomic builtins on arrays (PR target/82112)","Message-ID":"<20170907210945.GX2323@tucnak>","Reply-To":"Jakub Jelinek <jakub@redhat.com>","References":"<20170907084344.GT2323@tucnak>\n\t<alpine.DEB.2.20.1709071532100.21759@digraph.polyomino.org.uk>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<alpine.DEB.2.20.1709071532100.21759@digraph.polyomino.org.uk>","User-Agent":"Mutt/1.7.1 (2016-10-04)","X-IsSubscribed":"yes"}},{"id":1764958,"web_url":"http://patchwork.ozlabs.org/comment/1764958/","msgid":"<alpine.DEB.2.20.1709072138170.32296@digraph.polyomino.org.uk>","list_archive_url":null,"date":"2017-09-07T21:38:35","subject":"Re: [PATCH] Fix atomic builtins on arrays (PR target/82112)","submitter":{"id":4349,"url":"http://patchwork.ozlabs.org/api/people/4349/","name":"Joseph Myers","email":"joseph@codesourcery.com"},"content":"On Thu, 7 Sep 2017, Jakub Jelinek wrote:\n\n> Ah, ok, so like this instead?\n> \n> 2017-09-07  Jakub Jelinek  <jakub@redhat.com>\n> \n> \tPR target/82112\n> \t* c-common.c (sync_resolve_size): Instead of c_dialect_cxx ()\n> \tassertion check that in the condition.\n> \t(get_atomic_generic_size): Likewise.  Before testing if parameter\n> \thas pointer type, if it has array type, call for C++\n> \tdefault_conversion to perform array-to-pointer conversion.\n> \n> \t* c-c++-common/pr82112.c: New test.\n> \t* gcc.dg/pr82112.c: New test.\n\nThis version is OK.","headers":{"Return-Path":"<gcc-patches-return-461697-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-461697-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=\"H+K7Qfd6\"; 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 3xpDNg5ZSdz9sBW\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri,  8 Sep 2017 07:38:58 +1000 (AEST)","(qmail 114013 invoked by alias); 7 Sep 2017 21:38:51 -0000","(qmail 113428 invoked by uid 89); 7 Sep 2017 21:38:50 -0000","from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131)\n\tby sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with\n\tESMTP; Thu, 07 Sep 2017 21:38:45 +0000","from nat-ies.mentorg.com ([192.94.31.2]\n\thelo=svr-ies-mbx-01.mgc.mentorg.com)\tby relay1.mentorg.com\n\twith esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256)\tid\n\t1dq4VW-0006GI-KA from joseph_myers@mentor.com ;\n\tThu, 07 Sep 2017 14:38:42 -0700","from digraph.polyomino.org.uk (137.202.0.87) by\n\tsvr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) with Microsoft\n\tSMTP Server (TLS) id 15.0.1263.5; Thu, 7 Sep 2017 22:38:39 +0100","from jsm28 (helo=localhost)\tby digraph.polyomino.org.uk with\n\tlocal-esmtp (Exim 4.86_2)\t(envelope-from\n\t<joseph@codesourcery.com>)\tid 1dq4VP-0007fh-Di;\n\tThu, 07 Sep 2017 21:38:35 +0000"],"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:in-reply-to:message-id:references\n\t:mime-version:content-type; q=dns; s=default; b=r/4SDmKaIhJF62py\n\tgS2EHtCsYTAdLxj7s2z6oQrpbOKCdI6h9OabmVhHZ7bNmlqo2ReVPTYWaqeNJOZL\n\tHWpk/KOIpX9A5JZQW2BPTzWS44j7vhwJRPIUm25ffqvAsYbABnkRpz0KuBLs0gxT\n\tpJty2y06lMGp4EIVGICkkb5MPcg=","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:in-reply-to:message-id:references\n\t:mime-version:content-type; s=default; bh=MzkvpYlmgz7ez8gR2fIuHa\n\tL43xo=; b=H+K7Qfd6A/AWGg3GTSsuNqJJDivxxuUexy+StSFfR8a0rcTP5ngMCp\n\t3gRWpUcaT7UHeKpClf3QOv4VCVPkyl/IETN0mjgQsiO4M3VPVqeMqLZfpD6j8O6v\n\tQwbvi69Aorty6grQ1nN1eJtMs39ZVWo7hwlXIfRbBAy/7XaZdPwcA=","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=-2.0 required=5.0 tests=AWL, BAYES_00,\n\tRCVD_IN_DNSWL_NONE, SPF_PASS,\n\tURIBL_RED autolearn=ham version=3.3.2 spammy=","X-HELO":"relay1.mentorg.com","Date":"Thu, 7 Sep 2017 21:38:35 +0000","From":"Joseph Myers <joseph@codesourcery.com>","To":"Jakub Jelinek <jakub@redhat.com>","CC":"Marek Polacek <polacek@redhat.com>, Jason Merrill <jason@redhat.com>,\n\t<gcc-patches@gcc.gnu.org>","Subject":"Re: [PATCH] Fix atomic builtins on arrays (PR target/82112)","In-Reply-To":"<20170907210945.GX2323@tucnak>","Message-ID":"<alpine.DEB.2.20.1709072138170.32296@digraph.polyomino.org.uk>","References":"<20170907084344.GT2323@tucnak>\n\t<alpine.DEB.2.20.1709071532100.21759@digraph.polyomino.org.uk>\n\t<20170907210945.GX2323@tucnak>","User-Agent":"Alpine 2.20 (DEB 67 2015-01-07)","MIME-Version":"1.0","Content-Type":"text/plain; charset=\"US-ASCII\"","X-ClientProxiedBy":"svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To\n\tsvr-ies-mbx-01.mgc.mentorg.com (139.181.222.1)"}},{"id":1765503,"web_url":"http://patchwork.ozlabs.org/comment/1765503/","msgid":"<CADzB+2mFbz9yUst5U0vGcZAByQ7U8GVcUfw8+ebYFtQF3W42VA@mail.gmail.com>","list_archive_url":null,"date":"2017-09-08T16:39:06","subject":"Re: [PATCH] Fix atomic builtins on arrays (PR target/82112)","submitter":{"id":4337,"url":"http://patchwork.ozlabs.org/api/people/4337/","name":"Jason Merrill","email":"jason@redhat.com"},"content":"On Thu, Sep 7, 2017 at 11:38 PM, Joseph Myers <joseph@codesourcery.com> wrote:\n> On Thu, 7 Sep 2017, Jakub Jelinek wrote:\n>\n>> Ah, ok, so like this instead?\n>>\n>> 2017-09-07  Jakub Jelinek  <jakub@redhat.com>\n>>\n>>       PR target/82112\n>>       * c-common.c (sync_resolve_size): Instead of c_dialect_cxx ()\n>>       assertion check that in the condition.\n>>       (get_atomic_generic_size): Likewise.  Before testing if parameter\n>>       has pointer type, if it has array type, call for C++\n>>       default_conversion to perform array-to-pointer conversion.\n>>\n>>       * c-c++-common/pr82112.c: New test.\n>>       * gcc.dg/pr82112.c: New test.\n>\n> This version is OK.\n\nOK with me as well.\n\nJason","headers":{"Return-Path":"<gcc-patches-return-461735-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-461735-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=\"SmBYDJMk\"; 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 3xpjhp4JBfz9s8J\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat,  9 Sep 2017 02:39:37 +1000 (AEST)","(qmail 43289 invoked by alias); 8 Sep 2017 16:39:30 -0000","(qmail 42974 invoked by uid 89); 8 Sep 2017 16:39:30 -0000","from mail-it0-f47.google.com (HELO mail-it0-f47.google.com)\n\t(209.85.214.47) by sourceware.org\n\t(qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP;\n\tFri, 08 Sep 2017 16:39:29 +0000","by mail-it0-f47.google.com with SMTP id 6so2879791itl.1 for\n\t<gcc-patches@gcc.gnu.org>; Fri, 08 Sep 2017 09:39:29 -0700 (PDT)","by 10.107.181.23 with HTTP; Fri, 8 Sep 2017 09:39:06 -0700 (PDT)"],"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\n\t:mime-version:in-reply-to:references:from:date:message-id\n\t:subject:to:cc:content-type; q=dns; s=default; b=b1aoASfR0/W1FwB\n\tJ5kol+nI3hqbEAE1NqSu/QuZMxJh9uW5rzwDd0wIB9sNOtiBRpmhR0cpPwBwfOMR\n\td5DUlkOlfPvD+n5AVy3QgcR9HUZCjTcDvZpVbj74PcAjDVOMJx6lRqjRtkKww/5k\n\tyPX6uIWa0sJa91/UIiQDafm0O+AE=","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\n\t:mime-version:in-reply-to:references:from:date:message-id\n\t:subject:to:cc:content-type; s=default; bh=l+Opmv3Em861yKoGhqTfS\n\tScdS5U=; b=SmBYDJMkVxyRmeKcaPeCxkV8sP7fpRAH7YmeMKNJGA0WIbousdsng\n\tgMPvt581LTw7FsLz8MzEWRvrL0bGI85VEJ+wY7pHhGGk2jzDd3zQjHE5/N+7FkFp\n\tYnzUHfyw+n0x9fumC15rCY+lEfbGHBR1uQWcPFBgmpnCxJ/4AsUBsE=","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=-1.4 required=5.0 tests=AWL, BAYES_00,\n\tKAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_NONE,\n\tRCVD_IN_SORBS_SPAM,\n\tURIBL_RED autolearn=no version=3.3.2 spammy=Hx-languages-length:710","X-HELO":"mail-it0-f47.google.com","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net;\n\ts=20161025;\n\th=x-gm-message-state:mime-version:in-reply-to:references:from:date\n\t:message-id:subject:to:cc;\n\tbh=G1NTSULDa035QQUWzgf/6dRnAw5tbIUrS7Yrb5ew1w8=;\n\tb=KyRujzUMzmL+ciq20ScBuoIiRKGolMsRVoAikguxwGtyXKqGIkyUWLQTdtmA3CDLlt\n\t2N2pe4vtlWbpSzHvpmgBWS71obyLGOwBv5vNF4ezMPE8djXd7xlOY6bg2YAQo4ghY3y2\n\tbA4BdOVQS/cyfiQSutIV4DjKuvGbqn5hAptSx1nMBXEcLVT9WWsEodloti75AuW55ReL\n\th8gUtm5eFzdm1xHPfroNXFxRlnWnQcqn7syYgaC032xQ4C25LlZp/nFge/lW2wB6/g2U\n\t8iT0gzZYNhI2vELG148lO4ejkPCASzY+UKiWksgvCvkN7Oyl3fL0UL6PFFRUpQUV2cKV\n\tagpg==","X-Gm-Message-State":"AHPjjUiH+zrUdPQG2KwKVZah7YDDAeeTY81fKggDV4b8LCM8ZCwtnb84\tx0abp0hSPmX+KT3nRe+CFg24JLPzGP9y","X-Google-Smtp-Source":"ADKCNb6QPAIQHEgsKr3z/qWwPXq/VO1Sk6DWrXsNfAFpGOHZ8ESKjIzeAh06OZf3qiKfzl6enP1j9bgucfe9BbyYhWM=","X-Received":"by 10.36.201.196 with SMTP id h187mr1711466itg.42.1504888767307;\n\tFri, 08 Sep 2017 09:39:27 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<alpine.DEB.2.20.1709072138170.32296@digraph.polyomino.org.uk>","References":"<20170907084344.GT2323@tucnak>\n\t<alpine.DEB.2.20.1709071532100.21759@digraph.polyomino.org.uk>\n\t<20170907210945.GX2323@tucnak>\n\t<alpine.DEB.2.20.1709072138170.32296@digraph.polyomino.org.uk>","From":"Jason Merrill <jason@redhat.com>","Date":"Fri, 8 Sep 2017 18:39:06 +0200","Message-ID":"<CADzB+2mFbz9yUst5U0vGcZAByQ7U8GVcUfw8+ebYFtQF3W42VA@mail.gmail.com>","Subject":"Re: [PATCH] Fix atomic builtins on arrays (PR target/82112)","To":"Joseph Myers <joseph@codesourcery.com>","Cc":"Jakub Jelinek <jakub@redhat.com>, Marek Polacek <polacek@redhat.com>,\n\tgcc-patches List <gcc-patches@gcc.gnu.org>","Content-Type":"text/plain; charset=\"UTF-8\"","X-IsSubscribed":"yes"}}]