public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: [PATCH] openacc: Warnings for strange partitioning choices for parallel regions
       [not found]   ` <fcc26f90-4f53-ae71-914d-0cfb582f5222@codesourcery.com>
@ 2021-04-26 19:54     ` Thomas Schwinge
  2021-04-26 20:51       ` Tobias Burnus
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Schwinge @ 2021-04-26 19:54 UTC (permalink / raw)
  To: Tobias Burnus; +Cc: Jakub Jelinek, Julian Brown, gcc-patches, fortran

Hi!

On 2021-04-26T14:32:10+0200, Tobias Burnus <tobias@codesourcery.com> wrote:
> first, can you add an entry regarding this flag
> to https://gcc.gnu.org/gcc-12/changes.html ?

Is that a standard thing that all new command-line flags do get
highlighted there?  (I wouldn't have considered that one important
enough?)


> Secondly, I now see FAILs like:
>
> FAIL: gfortran.dg/goacc/classify-serial.f95   -O  (test for excess errors)
> Excess errors:
> gfortran.dg/goacc/classify-serial.f95:20:132: Warning: region contains gang partitioned code but is not gang partitioned [-Wopenacc-parallelism]
> gfortran.dg/goacc/classify-serial.f95:20:132: Warning: region contains vector partitioned code but is not vector partitioned [-Wopenacc-parallelism]

Eek!  I do reproduce that -- but only in a GCC build configuration
without offloading enabled!  For example, for
'gfortran.dg/goacc/classify-serial.f95', we've got the following diff in
diagnostics in a GCC build configuration without vs. with offloading
enabled:

    {+[...]/gcc/testsuite/gfortran.dg/goacc/classify-serial.f95: In function 'MAIN__._omp_fn.0':+}
    [...]/gcc/testsuite/gfortran.dg/goacc/classify-serial.f95:20:132: [-Warning:-]{+warning:+} region contains gang partitioned code but is not gang partitioned [-Wopenacc-parallelism]
    [...]/gcc/testsuite/gfortran.dg/goacc/classify-serial.f95:20:132: [-Warning:-]{+warning:+} region contains vector partitioned code but is not vector partitioned [-Wopenacc-parallelism]
    [...]/gcc/testsuite/gfortran.dg/goacc/classify-serial.f95:20:132: optimized: assigned OpenACC gang vector loop parallelism
    PASS: gfortran.dg/goacc/classify-serial.f95   -O   (test for warnings, line 20)
    [-XPASS:-]{+XFAIL:+} gfortran.dg/goacc/classify-serial.f95   -O  TODO 'serial' (test for bogus messages, line 20)
    PASS: gfortran.dg/goacc/classify-serial.f95   -O   (test for bogus messages, line 20)
    [-XPASS:-]{+XFAIL:+} gfortran.dg/goacc/classify-serial.f95   -O  TODO 'serial' (test for bogus messages, line 20)
    [-FAIL:-]{+PASS:+} gfortran.dg/goacc/classify-serial.f95   -O  (test for excess errors)[-Excess errors:-]
    [-[...]/gcc/testsuite/gfortran.dg/goacc/classify-serial.f95:20:132: Warning: region contains gang partitioned code but is not gang partitioned [-Wopenacc-parallelism]-]
    [-[...]/gcc/testsuite/gfortran.dg/goacc/classify-serial.f95:20:132: Warning: region contains vector partitioned code but is not vector partitioned [-Wopenacc-parallelism]-]
    PASS: gfortran.dg/goacc/classify-serial.f95   -O   scan-tree-dump-times ompexp "(?n)__attribute__\\(\\(oacc serial, omp target entrypoint\\)\\)" 1
    PASS: gfortran.dg/goacc/classify-serial.f95   -O   scan-tree-dump-times oaccdevlow "(?n)Function is OpenACC serial offload" 1
    PASS: gfortran.dg/goacc/classify-serial.f95   -O   scan-tree-dump-times oaccdevlow "(?n)Compute dimensions \\[1, 1, 1\\]" 1

Notice upper-case "Warning" vs. lower-case "warning".  That's for Fortran
only; for C, C++, it's lower-case "warning" for both build variants.

It's of course easy to fix up the regexp, but should we maybe rather
figure out how to unify the reporting?

I do understand that Fortran has some upper-case diagnostics, but I don't
understand the difference/relevance of GCC build configuration without
vs. with offloading enabled, how is that coming becoming relevant?

Also notice that the preamble "In function 'MAIN__._omp_fn.0':" only
appears in the GCC build configuration with offloading.  Looking at
'c-c++-common/goacc/classify-serial.c', for C, we've got "In function
'SERIAL._omp_fn.0':" for both GCC build configurations, and for C++,
we've got "In function '_Z6SERIALv._omp_fn.0':" without offloading
enabled vs. "In function 'SERIAL() [clone ._omp_fn.0]':" with offloading
enabled.

So there generally seems to be some difference in function outlining
setup without vs. with offloading enabled?  ..., and for Fortran, with
offloading enabled, that causes the outlined function to be
"de-Fortranified", thus the lower-case "warning" diagnostic?

> FAIL: gfortran.dg/goacc/kernels-decompose-2.f95   -O  (test for excess errors)
> Excess errors:
> gfortran.dg/goacc/kernels-decompose-2.f95:124:15: Warning: region contains gang partitioned code but is not gang partitioned [-Wopenacc-parallelism]
>
> FAIL: gfortran.dg/goacc/routine-module-mod-1.f90 (test for excess errors)
> Excess errors:
> gfortran.dg/goacc/routine-module-mod-1.f90:56:16: Warning: region is worker partitioned but does not contain worker partitioned code [-Wopenacc-parallelism]

..., and similarly, several more in 'libgomp.oacc-fortran'.


Grüße
 Thomas


> On 26.04.21 12:39, Thomas Schwinge wrote:
>
>> Hi!
>>
>> On 2021-02-26T04:21:54-0800, Julian Brown <julian@codesourcery.com> wrote:
>>> This patch adds warnings for strange partitioning choices -- specifying
>>> either more or fewer partitioning levels on a parallel directive than the
>>> enclosed offload region actually uses.
>> Thanks!
>>
>>> We've used a version of this patch on the og8/og9/og10 branches for
>>> quite a while.  Versions have been posted for mainline submission as
>>> part of a larger patch several times, e.g. here:
>>>
>>>    https://gcc.gnu.org/pipermail/gcc-patches/2018-October/507938.html
>>>
>>> One motivation for committing this patch is it removes an ongoing
>>> divergence in a large number of test cases between the og* branches and
>>> mainline, namely whether the added warnings are expected as a result of
>>> compiling those test cases, or not.
>>>
>>> The warnings themselves are perhaps slightly aggressive, but are intended
>>> to help the user write more efficient code.
>> As I'd said in
>> <http://mid.mail-archive.com/87zhoefcpf.fsf@euler.schwinge.homeip.net>:
>>
>> | The general intention is good, but I've seen cases where I considered
>> | these diagnostics to be too noisy.  See also the several 'dg-bogus'
>> | with XFAIL
>>
>> ... as well as 'dg-additional-options "-w"' being added.
>>
>> I've spent some more time on this; in particular, 'dg-bogus' with XFAIL
>> setup, to indicate individual items that I think need to be addressed.
>> (Please let me know if anybody makes a different categorization regarding
>> these.)  Of course, not all of our testcases are representative of
>> real-world code (but I've anyway removed '-w' in favor of 'dg-warning' or
>> 'dg-bogus' with XFAIL, for coverage), but I still came to the conclusion
>> that this is too noisy to enable by default (as had been proposed), and
>> thus for the time being have hidden it behind '-Wopenacc-parallelism'.
>> (Adding an option is good anyway, so that users are able to disable
>> unwanted diagnostics; we need to do that for other OpenACC diagnostics,
>> too.)  The goal is to eventually enable '-Wopenacc-parallelism', with
>> '-Wall' and some "special cases" with '-Wextra', I suppose.
>>
>> I've pushed "Add '-Wopenacc-parallelism'" to master branch in commit
>> 22cff118f7526bec195ed6e41452980820fdf3a8, see attached.
>>
>>
>> Grüße
>>   Thomas
>>
>>
> -----------------
> Mentor Graphics (Deutschland) GmbH, Arnulfstrasse 201, 80634 München Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Frank Thürauf
-----------------
Mentor Graphics (Deutschland) GmbH, Arnulfstrasse 201, 80634 München Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Frank Thürauf

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] openacc: Warnings for strange partitioning choices for parallel regions
  2021-04-26 19:54     ` [PATCH] openacc: Warnings for strange partitioning choices for parallel regions Thomas Schwinge
@ 2021-04-26 20:51       ` Tobias Burnus
  2021-04-26 21:23         ` [Patch, committed] OpenACC: Fix pattern in dg-bogus in Fortran testcases again (Re: [PATCH] openacc: Warnings for strange partitioning choices for parallel regions) Tobias Burnus
  0 siblings, 1 reply; 3+ messages in thread
From: Tobias Burnus @ 2021-04-26 20:51 UTC (permalink / raw)
  To: Thomas Schwinge; +Cc: Jakub Jelinek, Julian Brown, gcc-patches, fortran

On 26.04.21 21:54, Thomas Schwinge wrote:
> On 2021-04-26T14:32:10+0200, Tobias Burnus <tobias@codesourcery.com> wrote:
>> first, can you add an entry regarding this flag
>> to https://gcc.gnu.org/gcc-12/changes.html ?
> Is that a standard thing that all new command-line flags do get
> highlighted there?  (I wouldn't have considered that one important
> enough?)

I think options which one expects to to use as user – especially when
they are for consideration with -W... do make sense. In general, as a
user I am happy to have a more detailed information about changes than
'something has changed'.

>> Secondly, I now see FAILs like:
>>
>> FAIL: gfortran.dg/goacc/classify-serial.f95   -O  (test for excess errors)
>> Excess errors:
>> gfortran.dg/goacc/classify-serial.f95:20:132: Warning: region contains gang partitioned code but is not gang partitioned [-Wopenacc-parallelism]
>> gfortran.dg/goacc/classify-serial.f95:20:132: Warning: region contains vector partitioned code but is not vector partitioned [-Wopenacc-parallelism]
> Eek!  I do reproduce that -- but only in a GCC build configuration
> without offloading enabled!
Aha, that explains why you did commit it like that – now I have fixed
the nonoffload version – and broken the offloaded one.
> Notice upper-case "Warning" vs. lower-case "warning".  That's for Fortran
> only; for C, C++, it's lower-case "warning" for both build variants.
>
> It's of course easy to fix up the regexp, but should we maybe rather
> figure out how to unify the reporting?
>
> I do understand that Fortran has some upper-case diagnostics, but I don't
> understand the difference/relevance of GCC build configuration without
> vs. with offloading enabled, how is that coming becoming relevant?

The default is 'global_dc = &global_diagnostic_context' which gets
overridden in fortran/error.c.

I have no idea why there is a difference but wonder whether it has
something to do with taking the LTO path (flag_generate_offload) and
some overriding of the settings.

I believe this is done in tree.c's free_lang_data:
   if (in_lto_p
       || (!flag_generate_lto && !flag_generate_offload))
...
       return 0;
     }

  /* Reset diagnostic machinery.  */
   tree_diagnostics_defaults (global_dc);

And in cgraphunit.c's symbol_table::finalize_compilation_unit
   if (!in_lto_p && g->have_offload)
     flag_generate_offload = 1;

And g->have_offload is guarded by ENABLE_OFFLOAD.

> Also notice that the preamble "In function 'MAIN__._omp_fn.0':" only
> appears in the GCC build configuration with offloading.  Looking at
> 'c-c++-common/goacc/classify-serial.c', for C, we've got "In function
> 'SERIAL._omp_fn.0':" for both GCC build configurations, and for C++,
> we've got "In function '_Z6SERIALv._omp_fn.0':" without offloading
> enabled vs. "In function 'SERIAL() [clone ._omp_fn.0]':" with offloading
> enabled.

I note that:
langhooks.c:          (context->printer, _("In function %qs"),

and in cp/error.c's cp_print_error_function:
           pp_printf (context->printer, function_category (fndecl),
                      cxx_printable_name_translate (fndecl, 2));
My bet is that here the same happens as above – the global_dc gets
reset – and the diagnostic becomes different.

Tobias

-----------------
Mentor Graphics (Deutschland) GmbH, Arnulfstrasse 201, 80634 München Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Frank Thürauf

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Patch, committed] OpenACC: Fix pattern in dg-bogus in Fortran testcases again (Re: [PATCH] openacc: Warnings for strange partitioning choices for parallel regions)
  2021-04-26 20:51       ` Tobias Burnus
@ 2021-04-26 21:23         ` Tobias Burnus
  0 siblings, 0 replies; 3+ messages in thread
From: Tobias Burnus @ 2021-04-26 21:23 UTC (permalink / raw)
  To: Thomas Schwinge; +Cc: Jakub Jelinek, Julian Brown, gcc-patches, fortran

[-- Attachment #1: Type: text/plain, Size: 1349 bytes --]

Hi all,

as discussed below/in this thread, the reset of the diagnostic
contest affects the output with ENABLE_OFFLOAD. The attached
patch now uses [Ww]arning in dg-bogus.

It might be possible to reduce the differences between
ENABLE_OFFLOAD being true or false, but it does not seem to
be simple and may not be worth the effort.

In any case, this patch should permit to have no FAIL
with ENABLE_OFFLOAD set and unset. – And should make the
testers happy.

Committed as r12-135-gbd7ebe9da745a62184052dd1b15f4dd10fbdc9f4

Tobias

PS: 'Warning:' with Fortran diagnostic and ENABLE_OFFSET unset,
'warning:' with default diagnostic and ENABLE_OFFSET set – due to:

On 26.04.21 22:51, Tobias Burnus wrote:
> I believe this is done in tree.c's free_lang_data:
>  if (in_lto_p
>      || (!flag_generate_lto && !flag_generate_offload))
> ...
>      return 0;
>    }
>
>  /* Reset diagnostic machinery.  */
>  tree_diagnostics_defaults (global_dc);
>
> And in cgraphunit.c's symbol_table::finalize_compilation_unit
>  if (!in_lto_p && g->have_offload)
>    flag_generate_offload = 1;
>
> And g->have_offload is guarded by ENABLE_OFFLOAD.
-----------------
Mentor Graphics (Deutschland) GmbH, Arnulfstrasse 201, 80634 München Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Frank Thürauf

[-- Attachment #2: committed.diff --]
[-- Type: text/x-patch, Size: 11621 bytes --]

commit bd7ebe9da745a62184052dd1b15f4dd10fbdc9f4
Author: Tobias Burnus <tobias@codesourcery.com>
Date:   Mon Apr 26 22:59:21 2021 +0200

    OpenACC: Fix pattern in dg-bogus in Fortran testcases again
    
    It turned out that a compiler built without offloading support
    and one with can produce slightly different diagnostic.
    
    Offloading support implies ENABLE_OFFLOAD which implies that
    g->have_offload is set when offloading is actually needed.
    In cgraphunit.c, the latter causes flag_generate_offload = 1,
    which in turn affects tree.c's free_lang_data.
    
    The result is that the front-end specific diagnostic gets reset
    ('tree_diagnostics_defaults (global_dc)'), which affects in this
    case 'Warning' vs. 'warning' via the Fortran frontend.
    
    Result: 'Warning:' vs. 'warning:'.
    Side note: Other FE also override the diagnostic, leading to
    similar differences, e.g. the C++ FE outputs mangled function
    names differently, cf. patch thread.
    
    libgomp/ChangeLog:
    
            * testsuite/libgomp.oacc-fortran/par-reduction-2-1.f:
            Use [Ww]arning in dg-bogus as FE diagnostic and default
            diagnostic differ and the result depends on ENABLE_OFFLOAD.
            * testsuite/libgomp.oacc-fortran/par-reduction-2-2.f: Likewise.
            * testsuite/libgomp.oacc-fortran/parallel-dims.f90: Likewise.
            * testsuite/libgomp.oacc-fortran/parallel-reduction.f90: Likewise.
    
    gcc/testsuite/ChangeLog:
    
            * gfortran.dg/goacc/classify-serial.f95:
            Use [Ww]arning in dg-bogus as FE diagnostic and default
            diagnostic differ and the result depends on ENABLE_OFFLOAD.
            * gfortran.dg/goacc/kernels-decompose-2.f95: Likewise.
            * gfortran.dg/goacc/routine-module-mod-1.f90: Likewise.
---
 gcc/testsuite/gfortran.dg/goacc/classify-serial.f95           | 6 +++---
 gcc/testsuite/gfortran.dg/goacc/kernels-decompose-2.f95       | 2 +-
 gcc/testsuite/gfortran.dg/goacc/routine-module-mod-1.f90      | 2 +-
 libgomp/testsuite/libgomp.oacc-fortran/par-reduction-2-1.f    | 4 ++--
 libgomp/testsuite/libgomp.oacc-fortran/par-reduction-2-2.f    | 4 ++--
 libgomp/testsuite/libgomp.oacc-fortran/parallel-dims.f90      | 6 +++---
 libgomp/testsuite/libgomp.oacc-fortran/parallel-reduction.f90 | 4 ++--
 7 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/gcc/testsuite/gfortran.dg/goacc/classify-serial.f95 b/gcc/testsuite/gfortran.dg/goacc/classify-serial.f95
index 386b95e78e4..6dcb1b170f8 100644
--- a/gcc/testsuite/gfortran.dg/goacc/classify-serial.f95
+++ b/gcc/testsuite/gfortran.dg/goacc/classify-serial.f95
@@ -18,9 +18,9 @@ program main
   call setup(a, b)
 
   !$acc serial loop copyin (a(0:n-1), b(0:n-1)) copyout (c(0:n-1)) ! { dg-message "optimized: assigned OpenACC gang vector loop parallelism" }
-  ! { dg-bogus "Warning: region contains gang partitioned code but is not gang partitioned" "TODO 'serial'" { xfail *-*-* } .-1 }
-  ! { dg-bogus "Warning: region contains worker partitioned code but is not worker partitioned" "" { target *-*-* } .-2 }
-  ! { dg-bogus "Warning: region contains vector partitioned code but is not vector partitioned" "TODO 'serial'" { xfail *-*-* } .-3 }
+  ! { dg-bogus "\[Ww\]arning: region contains gang partitioned code but is not gang partitioned" "TODO 'serial'" { xfail *-*-* } .-1 }
+  ! { dg-bogus "\[Ww\]arning: region contains worker partitioned code but is not worker partitioned" "" { target *-*-* } .-2 }
+  ! { dg-bogus "\[Ww\]arning: region contains vector partitioned code but is not vector partitioned" "TODO 'serial'" { xfail *-*-* } .-3 }
   do i = 0, n - 1
      c(i) = a(i) + b(i)
   end do
diff --git a/gcc/testsuite/gfortran.dg/goacc/kernels-decompose-2.f95 b/gcc/testsuite/gfortran.dg/goacc/kernels-decompose-2.f95
index 1277ad9ddda..238482b91a4 100644
--- a/gcc/testsuite/gfortran.dg/goacc/kernels-decompose-2.f95
+++ b/gcc/testsuite/gfortran.dg/goacc/kernels-decompose-2.f95
@@ -122,7 +122,7 @@ program main
   !$acc end kernels
 
   !$acc kernels
-  ! { dg-bogus "Warning: region contains gang partitioned code but is not gang partitioned" "TODO 'kernels'" { xfail *-*-* } .-1 }
+  ! { dg-bogus "\[Ww\]arning: region contains gang partitioned code but is not gang partitioned" "TODO 'kernels'" { xfail *-*-* } .-1 }
   y = f_g (a(5)) ! { dg-line l_part[incr c_part] }
   !TODO If such a construct is placed in its own part (like it is, here), can't this actually use gang paralelism, instead of "gang-single"?
   ! { dg-message "note: beginning 'gang-single' part in OpenACC 'kernels' region" "" { target *-*-* } l_part$c_part }
diff --git a/gcc/testsuite/gfortran.dg/goacc/routine-module-mod-1.f90 b/gcc/testsuite/gfortran.dg/goacc/routine-module-mod-1.f90
index 198ae01914b..835619c6509 100644
--- a/gcc/testsuite/gfortran.dg/goacc/routine-module-mod-1.f90
+++ b/gcc/testsuite/gfortran.dg/goacc/routine-module-mod-1.f90
@@ -56,7 +56,7 @@ contains
   subroutine g_1
     implicit none
     !$acc routine gang
-    ! { dg-bogus "Warning: region is worker partitioned but does not contain worker partitioned code" "TODO default 'gang' 'vector'" { xfail *-*-* } .-3 }
+    ! { dg-bogus "\[Ww\]arning: region is worker partitioned but does not contain worker partitioned code" "TODO default 'gang' 'vector'" { xfail *-*-* } .-3 }
 
     integer :: i
 
diff --git a/libgomp/testsuite/libgomp.oacc-fortran/par-reduction-2-1.f b/libgomp/testsuite/libgomp.oacc-fortran/par-reduction-2-1.f
index baa472b3e87..1fe1b471107 100644
--- a/libgomp/testsuite/libgomp.oacc-fortran/par-reduction-2-1.f
+++ b/libgomp/testsuite/libgomp.oacc-fortran/par-reduction-2-1.f
@@ -18,7 +18,7 @@
 
 !$ACC PARALLEL NUM_GANGS(256) NUM_WORKERS(32) VECTOR_LENGTH(32)
 !$ACC& REDUCTION(+:RES1) COPY(RES1, RES2) ASYNC(1)
-!     { dg-bogus "Warning: region is gang partitioned but does not contain gang partitioned code" "TODO 'reduction', 'atomic'" { xfail *-*-* } .-1 }
+!     { dg-bogus "\[Ww\]arning: region is gang partitioned but does not contain gang partitioned code" "TODO 'reduction', 'atomic'" { xfail *-*-* } .-1 }
 !     { dg-warning "region is worker partitioned but does not contain worker partitioned code" "" { target *-*-* } .-2 }
 !     { dg-warning "region is vector partitioned but does not contain vector partitioned code" "" { target *-*-* } .-3 }
       res1 = res1 + 5
@@ -43,7 +43,7 @@
 
 !$ACC PARALLEL NUM_GANGS(8) NUM_WORKERS(32) VECTOR_LENGTH(32)
 !$ACC& REDUCTION(*:RES1) COPY(RES1, RES2) ASYNC(1)
-!     { dg-bogus "Warning: region is gang partitioned but does not contain gang partitioned code" "TODO 'reduction', 'atomic'" { xfail *-*-* } .-1 }
+!     { dg-bogus "\[Ww\]arning: region is gang partitioned but does not contain gang partitioned code" "TODO 'reduction', 'atomic'" { xfail *-*-* } .-1 }
 !     { dg-warning "region is worker partitioned but does not contain worker partitioned code" "" { target *-*-* } .-2 }
 !     { dg-warning "region is vector partitioned but does not contain vector partitioned code" "" { target *-*-* } .-3 }
       res1 = res1 * 5
diff --git a/libgomp/testsuite/libgomp.oacc-fortran/par-reduction-2-2.f b/libgomp/testsuite/libgomp.oacc-fortran/par-reduction-2-2.f
index 4ebab6c7b18..0221ab81281 100644
--- a/libgomp/testsuite/libgomp.oacc-fortran/par-reduction-2-2.f
+++ b/libgomp/testsuite/libgomp.oacc-fortran/par-reduction-2-2.f
@@ -18,7 +18,7 @@
 
 !$ACC PARALLEL NUM_GANGS(256) NUM_WORKERS(32) VECTOR_LENGTH(32)
 !$ACC& REDUCTION(+:RES1) COPY(RES1, RES2) ASYNC(1)
-!     { dg-bogus "Warning: region is gang partitioned but does not contain gang partitioned code" "TODO 'reduction', 'atomic'" { xfail *-*-* } .-1 }
+!     { dg-bogus "\[Ww\]arning: region is gang partitioned but does not contain gang partitioned code" "TODO 'reduction', 'atomic'" { xfail *-*-* } .-1 }
 !     { dg-warning "region is worker partitioned but does not contain worker partitioned code" "" { target *-*-* } .-2 }
 !     { dg-warning "region is vector partitioned but does not contain vector partitioned code" "" { target *-*-* } .-3 }
       res1 = res1 + 5
@@ -43,7 +43,7 @@
 
 !$ACC PARALLEL NUM_GANGS(8) NUM_WORKERS(32) VECTOR_LENGTH(32)
 !$ACC& REDUCTION(*:RES1) COPY(RES1, RES2) ASYNC(1)
-!     { dg-bogus "Warning: region is gang partitioned but does not contain gang partitioned code" "TODO 'reduction', 'atomic'" { xfail *-*-* } .-1 }
+!     { dg-bogus "\[Ww\]arning: region is gang partitioned but does not contain gang partitioned code" "TODO 'reduction', 'atomic'" { xfail *-*-* } .-1 }
 !     { dg-warning "region is worker partitioned but does not contain worker partitioned code" "" { target *-*-* } .-2 }
 !     { dg-warning "region is vector partitioned but does not contain vector partitioned code" "" { target *-*-* } .-3 }
       res1 = res1 * 5
diff --git a/libgomp/testsuite/libgomp.oacc-fortran/parallel-dims.f90 b/libgomp/testsuite/libgomp.oacc-fortran/parallel-dims.f90
index d9847969369..f69ab5a6642 100644
--- a/libgomp/testsuite/libgomp.oacc-fortran/parallel-dims.f90
+++ b/libgomp/testsuite/libgomp.oacc-fortran/parallel-dims.f90
@@ -87,9 +87,9 @@ program main
   vectors_max = -huge(gangs_max) - 1 ! INT_MIN
   !$acc serial copy (vectors_actual) &
   !$acc   copy (gangs_min, gangs_max, workers_min, workers_max, vectors_min, vectors_max) ! { dg-warning "using vector_length \\(32\\), ignoring 1" "" { target openacc_nvidia_accel_selected } }
-  ! { dg-bogus "Warning: region contains gang partitioned code but is not gang partitioned" "TODO 'serial'" { xfail *-*-* } .-1 }
-  ! { dg-bogus "Warning: region contains worker partitioned code but is not worker partitioned" "TODO 'serial'" { xfail *-*-* } .-2 }
-  ! { dg-bogus "Warning: region contains vector partitioned code but is not vector partitioned" "TODO 'serial'" { xfail *-*-* } .-3 }
+  ! { dg-bogus "\[Ww\]arning: region contains gang partitioned code but is not gang partitioned" "TODO 'serial'" { xfail *-*-* } .-1 }
+  ! { dg-bogus "\[Ww\]arning: region contains worker partitioned code but is not worker partitioned" "TODO 'serial'" { xfail *-*-* } .-2 }
+  ! { dg-bogus "\[Ww\]arning: region contains vector partitioned code but is not vector partitioned" "TODO 'serial'" { xfail *-*-* } .-3 }
   if (acc_on_device (acc_device_nvidia)) then
      ! The GCC nvptx back end enforces vector_length (32).
      ! It's unclear if that's actually permissible here;
diff --git a/libgomp/testsuite/libgomp.oacc-fortran/parallel-reduction.f90 b/libgomp/testsuite/libgomp.oacc-fortran/parallel-reduction.f90
index af25f0dac9b..99b1441136d 100644
--- a/libgomp/testsuite/libgomp.oacc-fortran/parallel-reduction.f90
+++ b/libgomp/testsuite/libgomp.oacc-fortran/parallel-reduction.f90
@@ -13,7 +13,7 @@ program reduction
   s2 = 0
 
   !$acc parallel reduction(+:s1,s2) num_gangs (n) copy(s1)
-  ! { dg-bogus "Warning: region is gang partitioned but does not contain gang partitioned code" "TODO 'reduction'" { xfail *-*-* } .-1 }
+  ! { dg-bogus "\[Ww\]arning: region is gang partitioned but does not contain gang partitioned code" "TODO 'reduction'" { xfail *-*-* } .-1 }
   s1 = s1 + 1
   s2 = s2 + 1
   !$acc end parallel
@@ -44,7 +44,7 @@ subroutine redsub(s1, s2, n)
   integer :: s1, s2, n
 
   !$acc parallel reduction(+:s1,s2) num_gangs (10)  copy(s1)
-  ! { dg-bogus "Warning: region is gang partitioned but does not contain gang partitioned code" "TODO 'reduction'" { xfail *-*-* } .-1 }
+  ! { dg-bogus "\[Ww\]arning: region is gang partitioned but does not contain gang partitioned code" "TODO 'reduction'" { xfail *-*-* } .-1 }
   s1 = s1 + 1
   s2 = s2 + 1
   !$acc end parallel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-04-26 21:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20210226122154.5209-1-julian@codesourcery.com>
     [not found] ` <871raxuy7g.fsf@euler.schwinge.homeip.net>
     [not found]   ` <fcc26f90-4f53-ae71-914d-0cfb582f5222@codesourcery.com>
2021-04-26 19:54     ` [PATCH] openacc: Warnings for strange partitioning choices for parallel regions Thomas Schwinge
2021-04-26 20:51       ` Tobias Burnus
2021-04-26 21:23         ` [Patch, committed] OpenACC: Fix pattern in dg-bogus in Fortran testcases again (Re: [PATCH] openacc: Warnings for strange partitioning choices for parallel regions) Tobias Burnus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).