diff mbox series

[8/8,og9] Update parallel-dims.c and serial-dims.c warning line numbering.

Message ID fcea4b6e384e30231ab6d88b1f9feb1007b3e96b.1564776081.git.julian@codesourcery.com
State New
Headers show
Series AMD GCN offloading support | expand

Commit Message

Julian Brown Aug. 2, 2019, 8:12 p.m. UTC
This patch adjusts the parallel-dims.c and serial-dims.c tests to
use relative, rather than absolute, line numbers for expected warning
emission.

ChangeLog

2019-07-31  Julian Brown  <julian@codesourcery.com>

	* testsuite/libgomp.oacc-c-c++-common/parallel-dims.c: Use relative
	line numbers for warning.
	* testsuite/libgomp.oacc-c-c++-common/serial-dims.c: Likewise.
---
 libgomp/ChangeLog.openacc                                 | 6 ++++++
 .../testsuite/libgomp.oacc-c-c++-common/parallel-dims.c   | 2 +-
 libgomp/testsuite/libgomp.oacc-c-c++-common/serial-dims.c | 8 ++++----
 3 files changed, 11 insertions(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/libgomp/ChangeLog.openacc b/libgomp/ChangeLog.openacc
index c850203e145..a187ebb7295 100644
--- a/libgomp/ChangeLog.openacc
+++ b/libgomp/ChangeLog.openacc
@@ -1,3 +1,9 @@ 
+2019-07-31  Julian Brown  <julian@codesourcery.com>
+
+	* testsuite/libgomp.oacc-c-c++-common/parallel-dims.c: Use relative
+	line numbers for warning.
+	* testsuite/libgomp.oacc-c-c++-common/serial-dims.c: Likewise.
+
 2019-07-31  Julian Brown  <julian@codesourcery.com>
 
 	* config/nvptx/gomp_print.c (gomp_print_string, gomp_print_integer,
diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/parallel-dims.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/parallel-dims.c
index ec63e3fe2c9..d9f2c75e868 100644
--- a/libgomp/testsuite/libgomp.oacc-c-c++-common/parallel-dims.c
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/parallel-dims.c
@@ -158,7 +158,7 @@  int main ()
     gangs_min = workers_min = vectors_min = INT_MAX;
     gangs_max = workers_max = vectors_max = INT_MIN;
 #pragma acc parallel copy (vectors_actual) /* { dg-warning "region contains vector partitioned code but is not vector partitioned" } */ \
-  /* { dg-warning "using vector_length \\(32\\), ignoring 1" "" { target openacc_nvidia_accel_selected } 157 } */ \
+  /* { dg-warning "using vector_length \\(32\\), ignoring 1" "" { target openacc_nvidia_accel_selected } .-1 } */ \
   vector_length (VECTORS) /* { dg-warning "'vector_length' value must be positive" "" { target c++ } } */
     {
       /* We're actually executing with vector_length (1), just the GCC nvptx
diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/serial-dims.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/serial-dims.c
index d4692091b84..fd4b17c40c2 100644
--- a/libgomp/testsuite/libgomp.oacc-c-c++-common/serial-dims.c
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/serial-dims.c
@@ -59,10 +59,10 @@  int main ()
     gangs_max = workers_max = vectors_max = INT_MIN;
     gangs_actual = workers_actual = vectors_actual = 1;
 #pragma acc serial
-    /* { dg-warning "region contains gang partitioned code but is not gang partitioned" "" { target *-*-* } 58 } */
-    /* { dg-warning "region contains worker partitioned code but is not worker partitioned" "" { target *-*-* } 58 } */
-    /* { dg-warning "region contains vector partitioned code but is not vector partitioned" "" { target *-*-* } 58 } */
-    /* { dg-warning "using vector_length \\(32\\), ignoring 1" "" { target openacc_nvidia_accel_selected } 58 } */
+    /* { dg-warning "region contains gang partitioned code but is not gang partitioned" "" { target *-*-* } .-1 } */
+    /* { dg-warning "region contains worker partitioned code but is not worker partitioned" "" { target *-*-* } .-2 } */
+    /* { dg-warning "region contains vector partitioned code but is not vector partitioned" "" { target *-*-* } .-3 } */
+    /* { dg-warning "using vector_length \\(32\\), ignoring 1" "" { target openacc_nvidia_accel_selected } .-4 } */
     {
       if (acc_on_device (acc_device_nvidia))
 	{