Skip to content

Commit 9f5d22e

Browse files
committed
OpenMP: Constructors and destructors for "declare target" static aggregates: Fix effective-target keyword in test cases
(Most of) the tests added in commit f1bfba3 "OpenMP: Constructors and destructors for "declare target" static aggregates" had a mismatch between dump file production and its scanning; the former needs to use 'offload_target_nvptx' (like 'offload_target_amdgcn'), not 'offload_device_nvptx'. libgomp/ * testsuite/libgomp.c++/static-aggr-constructor-destructor-1.C: Fix effective-target keyword. * testsuite/libgomp.c++/static-aggr-constructor-destructor-2.C: Likewise. * testsuite/libgomp.c-c++-common/target-is-initial-host-2.c: Likewise. * testsuite/libgomp.c-c++-common/target-is-initial-host.c: Likewise. * testsuite/libgomp.fortran/target-is-initial-host-2.f90: Likewise. * testsuite/libgomp.fortran/target-is-initial-host.f: Likewise. * testsuite/libgomp.fortran/target-is-initial-host.f90: Likewise.
1 parent a90c74a commit 9f5d22e

File tree

7 files changed

+7
-7
lines changed

7 files changed

+7
-7
lines changed

libgomp/testsuite/libgomp.c++/static-aggr-constructor-destructor-1.C

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// { dg-do run }
22
// { dg-additional-options "-fdump-tree-gimple -fdump-tree-optimized" }
3-
// { dg-additional-options -foffload-options=-fdump-tree-optimized { target { offload_device_nvptx || offload_target_amdgcn } } }
3+
// { dg-additional-options -foffload-options=-fdump-tree-optimized { target { offload_target_nvptx || offload_target_amdgcn } } }
44

55
// { dg-final { scan-tree-dump-times "omp_is_initial_device" 1 "gimple" } }
66
// { dg-final { scan-tree-dump-times "_GLOBAL__off_I_v1" 1 "gimple" } }

libgomp/testsuite/libgomp.c++/static-aggr-constructor-destructor-2.C

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// { dg-do run }
22
// { dg-additional-options "-fdump-tree-gimple -fdump-tree-optimized" }
3-
// { dg-additional-options -foffload-options=-fdump-tree-optimized { target { offload_device_nvptx || offload_target_amdgcn } } }
3+
// { dg-additional-options -foffload-options=-fdump-tree-optimized { target { offload_target_nvptx || offload_target_amdgcn } } }
44

55
// { dg-final { scan-tree-dump-times "omp_is_initial_device" 1 "gimple" } }
66
// { dg-final { scan-tree-dump-times "_GLOBAL__off_I_v1" 1 "gimple" } }

libgomp/testsuite/libgomp.c-c++-common/target-is-initial-host-2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
/* Check whether 'omp_is_initial_device()' is NOT compile-time optimized. */
55

66
/* { dg-additional-options "-fdump-tree-gimple -fdump-tree-optimized" } */
7-
/* { dg-additional-options -foffload-options=-fdump-tree-optimized { target { offload_device_nvptx || offload_target_amdgcn } } } */
7+
/* { dg-additional-options -foffload-options=-fdump-tree-optimized { target { offload_target_nvptx || offload_target_amdgcn } } } */
88

99
/* { dg-final { scan-tree-dump-times "omp_is_initial_device" 1 "gimple" } } */
1010

libgomp/testsuite/libgomp.c-c++-common/target-is-initial-host.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/* Check whether 'omp_is_initial_device()' is properly compile-time optimized. */
44

55
/* { dg-additional-options "-fdump-tree-gimple -fdump-tree-optimized" } */
6-
/* { dg-additional-options -foffload-options=-fdump-tree-optimized { target { offload_device_nvptx || offload_target_amdgcn } } } */
6+
/* { dg-additional-options -foffload-options=-fdump-tree-optimized { target { offload_target_nvptx || offload_target_amdgcn } } } */
77

88
/* { dg-final { scan-tree-dump-times "omp_is_initial_device" 1 "gimple" } } */
99

libgomp/testsuite/libgomp.fortran/target-is-initial-host-2.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
! Check whether 'omp_is_initial_device()' is NOT compile-time optimized. */
44

55
! { dg-additional-options "-fdump-tree-gimple -fdump-tree-optimized" }
6-
! { dg-additional-options -foffload-options=-fdump-tree-optimized { target { offload_device_nvptx || offload_target_amdgcn } } }
6+
! { dg-additional-options -foffload-options=-fdump-tree-optimized { target { offload_target_nvptx || offload_target_amdgcn } } }
77

88
! { dg-final { scan-tree-dump-times "omp_is_initial_device" 1 "gimple" } }
99

libgomp/testsuite/libgomp.fortran/target-is-initial-host.f

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
! Check whether 'omp_is_initial_device()' is properly compile-time optimized. */
22

33
! { dg-additional-options "-fdump-tree-gimple -fdump-tree-optimized" }
4-
! { dg-additional-options -foffload-options=-fdump-tree-optimized { target { offload_device_nvptx || offload_target_amdgcn } } }
4+
! { dg-additional-options -foffload-options=-fdump-tree-optimized { target { offload_target_nvptx || offload_target_amdgcn } } }
55

66
! { dg-final { scan-tree-dump-times "omp_is_initial_device" 1 "gimple" } }
77

libgomp/testsuite/libgomp.fortran/target-is-initial-host.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
! Check whether 'omp_is_initial_device()' is properly compile-time optimized. */
22

33
! { dg-additional-options "-fdump-tree-gimple -fdump-tree-optimized" }
4-
! { dg-additional-options -foffload-options=-fdump-tree-optimized { target { offload_device_nvptx || offload_target_amdgcn } } }
4+
! { dg-additional-options -foffload-options=-fdump-tree-optimized { target { offload_target_nvptx || offload_target_amdgcn } } }
55

66
! { dg-final { scan-tree-dump-times "omp_is_initial_device" 1 "gimple" } }
77

0 commit comments

Comments
 (0)