From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa4.mentor.iphmx.com (esa4.mentor.iphmx.com [68.232.137.252]) by sourceware.org (Postfix) with ESMTPS id 387573858C50 for ; Wed, 2 Nov 2022 11:25:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 387573858C50 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com X-IronPort-AV: E=Sophos;i="5.95,232,1661846400"; d="scan'208";a="85903723" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa4.mentor.iphmx.com with ESMTP; 02 Nov 2022 03:25:34 -0800 IronPort-SDR: hUGLbpbYdAGPqiIqy5/DSOjNd1CBOD4NqEETvjrbWycTSIH2fytDvlYgJbaQIr83mku2unkoCs IRGrgnn8pVp8LNVfyAvpwEXJOFZZJ4z9YPFC24WqpYercuZw2TexL5zZd6a8NRqfpU3zx7MYOw 8uQv7F/K5dxYOWm/YVQDfnrDfq6WgrQgqEccU2FLg3k8oz5KWdWQ78CHg2qeMtGwhK6yQFrqvf +BzZz2DebLM1qp3ZEbb9DcbSMvt/WcO/E+RO7po4UwWTShHLv0e6xEDOKgTAjzW4hH77USAvAT 7d8= From: Thomas Schwinge To: Tobias Burnus CC: Subject: [og12] OpenACC: Fix reduction tree-sharing issue [PR106982] (was: [gcc/devel/omp/gcc-12] Merge branch 'releases/gcc-12' into devel/omp/gcc-12) In-Reply-To: <20220929144503.459CB385782F@sourceware.org> References: <20220929144503.459CB385782F@sourceware.org> User-Agent: Notmuch/0.29.3+94~g74c3f1b (https://notmuchmail.org) Emacs/27.1 (x86_64-pc-linux-gnu) Date: Wed, 2 Nov 2022 12:25:24 +0100 Message-ID: <871qqlmwd7.fsf@euler.schwinge.homeip.net> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-11.mgc.mentorg.com (139.181.222.11) To svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) X-Spam-Status: No, score=-5.9 required=5.0 tests=BAYES_00,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,KAM_SHORT,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi Tobias! On 2022-09-29T14:45:03+0000, Tobias Burnus via Gcc-cvs wrote: > https://gcc.gnu.org/g:c455181c13a7b00ee09777287bcf0c8b9de9d1fe > > commit c455181c13a7b00ee09777287bcf0c8b9de9d1fe > Merge: d21bfef9867 85adc2ec2b0 > Author: Tobias Burnus > Date: Thu Sep 29 16:37:52 2022 +0200 > > Merge branch 'releases/gcc-12' into devel/omp/gcc-12 > > Merged up to r12-8794-g85adc2ec2b0736d07c0df35ad9a450f97ff59a7c (29th= Sept 2022) > > This includes r12-8793-gafea1ae84f0 (cherry-picked from r13-2868-gd3d= f98807b5) > "OpenACC: Fix reduction tree-sharing issue [PR106982]". However, due= to > omp-low.cc changes, it neither applies cleanly nor it required to mak= e the > testcases pass. This merge adds the testcases - but due to conflicts = under a > different filename: gcc/testsuite/c-c++-common/goacc/reduction-7.c ad= ded as > ...-9.c and ...-8.c added as ...-10.c. Hmm, it seems that something needs to be done in og12 'gcc/omp-low.cc', too -- I do confirm: +PASS: c-c++-common/goacc/reduction-9.c (test for excess errors) ..., but: +FAIL: c-c++-common/goacc/reduction-10.c (internal compiler error: veri= fy_gimple failed) +FAIL: c-c++-common/goacc/reduction-10.c (test for excess errors) [...]/source-gcc/gcc/testsuite/c-c++-common/goacc/reduction-10.c: In fu= nction 'test1': [...]/source-gcc/gcc/testsuite/c-c++-common/goacc/reduction-10.c:10:9: = error: incorrect sharing of tree nodes MEM [(double *)&reduced] MEM [(double *)&reduced] =3D .GOACC_REDUCTION (INIT, 0, MEM= [(double *)&reduced], -1, 73, 0); [...]/source-gcc/gcc/testsuite/c-c++-common/goacc/reduction-10.c:10:9: = error: incorrect sharing of tree nodes MEM [(double *)&reduced] #pragma acc loop reduction(*:MEM [(double *)&reduced]) work= er private(y) for (y =3D 0; y < 5; y =3D y + 1) [...]/source-gcc/gcc/testsuite/c-c++-common/goacc/reduction-10.c:10:9: = error: incorrect sharing of tree nodes MEM [(double *)&reduced] MEM [(double *)&reduced] =3D .GOACC_REDUCTION (FINI, 0, MEM= [(double *)&reduced], -1, 73, 0); [...]/source-gcc/gcc/testsuite/c-c++-common/goacc/reduction-10.c:10:9: = error: incorrect sharing of tree nodes MEM [(double *)&reduced] MEM [(double *)&reduced] =3D .GOACC_REDUCTION (TEARDOWN, 0,= MEM [(double *)&reduced], -1, 73, 0); during GIMPLE pass: cfg [...]/source-gcc/gcc/testsuite/c-c++-common/goacc/reduction-10.c:10:9: = internal compiler error: verify_gimple failed (Same for C++ testing.) Gr=C3=BC=C3=9Fe Thomas > Diff: > > gcc/ChangeLog | 24 +++++++++++++ > gcc/DATESTAMP | 2 +- > gcc/config/aarch64/aarch64-cores.def | 3 +- > gcc/config/aarch64/aarch64-tune.md | 2 +- > gcc/config/aarch64/aarch64.cc | 40 +++++++++++-----= ------ > gcc/doc/invoke.texi | 2 +- > gcc/omp-low.cc | 3 +- > gcc/testsuite/c-c++-common/goacc/reduction-10.c | 12 +++++++ > gcc/testsuite/c-c++-common/goacc/reduction-9.c | 22 ++++++++++++ > libstdc++-v3/doc/html/index.html | 2 +- > libstdc++-v3/doc/html/manual/api.html | 5 +++ > libstdc++-v3/doc/html/manual/appendix.html | 2 +- > libstdc++-v3/doc/html/manual/appendix_porting.html | 2 +- > libstdc++-v3/doc/html/manual/bugs.html | 6 ++++ > libstdc++-v3/doc/html/manual/index.html | 2 +- > libstdc++-v3/doc/html/manual/using_macros.html | 5 +-- > libstdc++-v3/doc/xml/manual/evolution.xml | 13 +++++++ > libstdc++-v3/doc/xml/manual/intro.xml | 9 +++++ > libstdc++-v3/doc/xml/manual/using.xml | 5 +-- > libstdc++-v3/include/std/functional | 32 ++++++++++++----= - > libstdc++-v3/testsuite/20_util/bind/cv_quals.cc | 25 +++++++------- > libstdc++-v3/testsuite/20_util/bind/cv_quals_2.cc | 12 ++++--- > 22 files changed, 172 insertions(+), 58 deletions(-) > > diff --cc gcc/testsuite/c-c++-common/goacc/reduction-10.c > index 00000000000,00000000000..2c3ed499d5b > new file mode 100644 > --- /dev/null > +++ b/gcc/testsuite/c-c++-common/goacc/reduction-10.c > @@@ -1,0 -1,0 +1,12 @@@ > ++/* { dg-do compile } */ > ++ > ++/* PR middle-end/106982 */ > ++ > ++void test1(double *c) > ++{ > ++ double reduced[5]; > ++#pragma acc parallel loop gang private(reduced) > ++ for (int x =3D 0; x < 5; ++x) > ++#pragma acc loop worker reduction(*:reduced) > ++ for (int y =3D 0; y < 5; ++y) { } > ++} > diff --cc gcc/testsuite/c-c++-common/goacc/reduction-9.c > index 00000000000,00000000000..482b0ab1984 > new file mode 100644 > --- /dev/null > +++ b/gcc/testsuite/c-c++-common/goacc/reduction-9.c > @@@ -1,0 -1,0 +1,22 @@@ > ++/* { dg-do compile } */ > ++ > ++/* PR middle-end/106982 */ > ++ > ++long long n =3D 100; > ++int multiplicitive_n =3D 128; > ++ > ++void test1(double *rand, double *a, double *b, double *c) > ++{ > ++#pragma acc data copyin(a[0:10*multiplicitive_n], b[0:10*multiplicitive= _n]) copyout(c[0:10]) > ++ { > ++#pragma acc parallel loop > ++ for (int i =3D 0; i < 10; ++i) > ++ { > ++ double temp =3D 1.0; > ++#pragma acc loop vector reduction(*:temp) > ++ for (int j =3D 0; j < multiplicitive_n; ++j) > ++ temp *=3D a[(i * multiplicitive_n) + j] + b[(i * multipliciti= ve_n) + j]; > ++ c[i] =3D temp; > ++ } > ++ } > ++} ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstra=C3=9Fe 201= , 80634 M=C3=BCnchen; Gesellschaft mit beschr=C3=A4nkter Haftung; Gesch=C3= =A4ftsf=C3=BChrer: Thomas Heurung, Frank Th=C3=BCrauf; Sitz der Gesellschaf= t: M=C3=BCnchen; Registergericht M=C3=BCnchen, HRB 106955