On Sat, Jul 20, 2024 at 02:42:25PM -0600, Sandra Loosemore wrote:
> --- /dev/null
> +++ b/gcc/testsuite/c-c++-common/gomp/attrs-metadirective-1.c
> @@ -0,0 +1,41 @@
> +/* { dg-do compile { target { c || c++11 } } } */
> +/* { dg-options "-fopenmp -std=c23" { target { c } } } */
> +
> +#define N 100
> +
> +void f (int a[], int b[], int c[])

Unless testcases specifically test for other formatting, usually
they should follow the normal GNU coding conventions, so
void
f (int a[], int b[], int c[])

> +int main (void)

Ditto.

> +/* { dg-final { scan-tree-dump-times "#pragma omp metadirective" 1 
> "original" } } */
> +/* { dg-final { scan-tree-dump-times "when \\(device = .*arch.*nvptx.*\\):" 
> 1 "original" } } */
> +/* { dg-final { scan-tree-dump-times "#pragma omp teams" 1 "original" } } */
> +/* { dg-final { scan-tree-dump-times "otherwise:" 1 "original" } } */
> +/* { dg-final { scan-tree-dump-times "#pragma omp parallel" 1 "original" } } 
> */
> +/* { dg-final { scan-tree-dump-times "#pragma omp loop" 2 "original" } } */
> +
> +/* { dg-final { scan-tree-dump-times "#pragma omp metadirective" 1 "gimple" 
> } } */
> +
> +/* { dg-final { scan-tree-dump-not "#pragma omp metadirective" "optimized" } 
> } */

Have you tested all the new scan-tree-dump* testcases both in builds
configured with and without offloading?  Those very often suffer from dump
differences...

And, as I wrote in the C++ FE patch review, there should be test coverage
for when device_num or condition is used in a template and is not value or
type dependent, or when it is not type dependent but value dependent, and
when it is value dependent.

        Jakub

Reply via email to