From: Kwok Cheung Yeung Date: Thu, 29 Apr 2021 22:19:22 +0000 (-0700) Subject: Fix OpenACC tests introduced in GCC 11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=605a6d558ce39d0e0890433be6b0fb1726011300;p=thirdparty%2Fgcc.git Fix OpenACC tests introduced in GCC 11 OG11 has additional warnings compared to mainline, which are not expected by tests newly introduced in GCC 11. Also, some of the dump messages are now emitted in the oaccloops pass rather than oaccdevlow. 2021-04-29 Kwok Cheung Yeung gcc/testsuite/ * c-c++-common/goacc/classify-serial.c: Surpress warnings. Dump oaccloops pass instead of oaccdevlow. * gfortran.dg/goacc/classify-serial.f95: Likewise. libgomp/ * testsuite/libgomp.oacc-c-c++-common/pr85381-3.c: Surpress warnings. * testsuite/libgomp.oacc-c-c++-common/static-variable-1.c: Likewise. --- diff --git a/gcc/testsuite/ChangeLog.omp b/gcc/testsuite/ChangeLog.omp index d1a30bf2ac3e..e6d06f5ff5a0 100644 --- a/gcc/testsuite/ChangeLog.omp +++ b/gcc/testsuite/ChangeLog.omp @@ -1,3 +1,9 @@ +2021-04-29 Kwok Cheung Yeung + + * c-c++-common/goacc/classify-serial.c: Surpress warnings. Dump + oaccloops pass instead of oaccdevlow. + * gfortran.dg/goacc/classify-serial.f95: Likewise. + 2021-04-29 Kwok Cheung Yeung * c-c++-common/goacc/data-clause-1.c (foo): Remove expected message. diff --git a/gcc/testsuite/c-c++-common/goacc/classify-serial.c b/gcc/testsuite/c-c++-common/goacc/classify-serial.c index 94ace1b3c200..63dd41511c44 100644 --- a/gcc/testsuite/c-c++-common/goacc/classify-serial.c +++ b/gcc/testsuite/c-c++-common/goacc/classify-serial.c @@ -1,10 +1,10 @@ /* Check offloaded function's attributes and classification for OpenACC serial. */ -/* { dg-additional-options "-O2" } +/* { dg-additional-options "-O2 -w" } { dg-additional-options "-fopt-info-optimized-omp" } { dg-additional-options "-fdump-tree-ompexp" } - { dg-additional-options "-fdump-tree-oaccdevlow" } */ + { dg-additional-options "-fdump-tree-oaccloops" } */ #define N 1024 @@ -24,6 +24,6 @@ void SERIAL () /* Check the offloaded function's classification and compute dimensions (will always be 1 x 1 x 1 for non-offloading compilation). - { dg-final { scan-tree-dump-times "(?n)Function is OpenACC serial offload" 1 "oaccdevlow" } } - { dg-final { scan-tree-dump-times "(?n)Compute dimensions \\\[1, 1, 1\\\]" 1 "oaccdevlow" } } - { dg-final { scan-tree-dump-times "(?n)__attribute__\\(\\(oacc function \\(1, 1, 1\\), oacc serial, omp target entrypoint\\)\\)" 1 "oaccdevlow" } } */ + { dg-final { scan-tree-dump-times "(?n)Function is OpenACC serial offload" 1 "oaccloops" } } + { dg-final { scan-tree-dump-times "(?n)Compute dimensions \\\[1, 1, 1\\\]" 1 "oaccloops" } } + { dg-final { scan-tree-dump-times "(?n)__attribute__\\(\\(oacc function \\(1, 1, 1\\), oacc serial, omp target entrypoint\\)\\)" 1 "oaccloops" } } */ diff --git a/gcc/testsuite/gfortran.dg/goacc/classify-serial.f95 b/gcc/testsuite/gfortran.dg/goacc/classify-serial.f95 index 51061afd2c64..16d415406f30 100644 --- a/gcc/testsuite/gfortran.dg/goacc/classify-serial.f95 +++ b/gcc/testsuite/gfortran.dg/goacc/classify-serial.f95 @@ -1,10 +1,10 @@ ! Check offloaded function's attributes and classification for OpenACC ! serial. -! { dg-additional-options "-O2" } +! { dg-additional-options "-O2 -w" } ! { dg-additional-options "-fopt-info-optimized-omp" } ! { dg-additional-options "-fdump-tree-ompexp" } -! { dg-additional-options "-fdump-tree-oaccdevlow" } +! { dg-additional-options "-fdump-tree-oaccloops" } program main implicit none @@ -26,6 +26,6 @@ end program main ! Check the offloaded function's classification and compute dimensions (will ! always be 1 x 1 x 1 for non-offloading compilation). -! { dg-final { scan-tree-dump-times "(?n)Function is OpenACC serial offload" 1 "oaccdevlow" } } -! { dg-final { scan-tree-dump-times "(?n)Compute dimensions \\\[1, 1, 1\\\]" 1 "oaccdevlow" } } -! { dg-final { scan-tree-dump-times "(?n)__attribute__\\(\\(oacc function \\(1, 1, 1\\), oacc serial, omp target entrypoint\\)\\)" 1 "oaccdevlow" } } +! { dg-final { scan-tree-dump-times "(?n)Function is OpenACC serial offload" 1 "oaccloops" } } +! { dg-final { scan-tree-dump-times "(?n)Compute dimensions \\\[1, 1, 1\\\]" 1 "oaccloops" } } +! { dg-final { scan-tree-dump-times "(?n)__attribute__\\(\\(oacc function \\(1, 1, 1\\), oacc serial, omp target entrypoint\\)\\)" 1 "oaccloops" } } diff --git a/libgomp/ChangeLog.omp b/libgomp/ChangeLog.omp index 23d243dec454..33a5f5b0cf67 100644 --- a/libgomp/ChangeLog.omp +++ b/libgomp/ChangeLog.omp @@ -1,3 +1,8 @@ +2021-04-29 Kwok Cheung Yeung + + * testsuite/libgomp.oacc-c-c++-common/pr85381-3.c: Surpress warnings. + * testsuite/libgomp.oacc-c-c++-common/static-variable-1.c: Likewise. + 2021-04-22 Kwok Cheung Yeung Backport from mainline diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/pr85381-3.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/pr85381-3.c index cddbf2719067..53fb049f9921 100644 --- a/libgomp/testsuite/libgomp.oacc-c-c++-common/pr85381-3.c +++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/pr85381-3.c @@ -1,6 +1,6 @@ /* { dg-do run { target openacc_nvidia_accel_selected } } { dg-skip-if "" { *-*-* } { "*" } { "-O2" } } */ -/* { dg-additional-options "-foffload=-fdump-rtl-mach" } */ +/* { dg-additional-options "-foffload=-fdump-rtl-mach -w" } */ int a; #pragma acc declare create(a) diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/static-variable-1.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/static-variable-1.c index 1d415cdcf769..ccc0336bae30 100644 --- a/libgomp/testsuite/libgomp.oacc-c-c++-common/static-variable-1.c +++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/static-variable-1.c @@ -9,6 +9,7 @@ variables" (only visible to members of the GitHub OpenACC organization). */ +/* { dg-additional-options "-w" } */ #undef NDEBUG #include