]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Merge branch 'releases/gcc-12' into devel/omp/gcc-12
authorTobias Burnus <tobias@codesourcery.com>
Thu, 29 Sep 2022 14:37:52 +0000 (16:37 +0200)
committerTobias Burnus <tobias@codesourcery.com>
Thu, 29 Sep 2022 14:37:52 +0000 (16:37 +0200)
Merged up to r12-8794-g85adc2ec2b0736d07c0df35ad9a450f97ff59a7c (29th Sept 2022)

This includes r12-8793-gafea1ae84f0 (cherry-picked from r13-2868-gd3df98807b5)
"OpenACC: Fix reduction tree-sharing issue [PR106982]".  However, due to
omp-low.cc changes, it neither applies cleanly nor it required to make 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 added as
...-9.c and ...-8.c added as ...-10.c.

1  2 
gcc/config/aarch64/aarch64.cc
gcc/doc/invoke.texi
gcc/omp-low.cc
gcc/testsuite/c-c++-common/goacc/reduction-10.c
gcc/testsuite/c-c++-common/goacc/reduction-9.c

Simple merge
Simple merge
diff --cc gcc/omp-low.cc
Simple merge
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..2c3ed499d5b63c394373b0b816cea0b18f322cdd
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -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 = 0; x < 5; ++x)
++#pragma acc loop worker reduction(*:reduced)
++      for (int y = 0; y < 5; ++y) { }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..482b0ab1984e75bd822efea2b6e825f598921f25
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,22 @@@
++/* { dg-do compile } */
++
++/* PR middle-end/106982 */
++
++long long n = 100;
++int multiplicitive_n = 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 = 0; i < 10; ++i)
++        {
++        double temp = 1.0;
++#pragma acc loop vector reduction(*:temp)
++        for (int j = 0; j < multiplicitive_n; ++j)
++          temp *= a[(i * multiplicitive_n) + j] + b[(i * multiplicitive_n) + j];
++        c[i] = temp;
++        }
++    }
++}