]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[testsuite] Avoid Tcl 8.5-specific behavior
authorThomas Schwinge <thomas@codesourcery.com>
Mon, 16 Nov 2020 16:37:06 +0000 (17:37 +0100)
committerThomas Schwinge <thomas@codesourcery.com>
Tue, 24 Nov 2020 09:29:35 +0000 (10:29 +0100)
gcc/
* doc/install.texi (Prerequisites) <Tcl>: Add comment.
gcc/testsuite/
* c-c++-common/goacc/kernels-decompose-1.c: Avoid Tcl 8.5-specific
behavior.
* c-c++-common/goacc/kernels-decompose-2.c: Likewise.
* gfortran.dg/goacc/kernels-decompose-1.f95: Likewise.
* gfortran.dg/goacc/kernels-decompose-2.f95: Likewise.
libgomp/
* testsuite/libgomp.oacc-c-c++-common/kernels-decompose-1.c: Avoid
Tcl 8.5-specific behavior.
* testsuite/libgomp.oacc-fortran/pr94358-1.f90: Likewise.

Reported-by: David Edelsohn <dje.gcc@gmail.com>
gcc/doc/install.texi
gcc/testsuite/c-c++-common/goacc/kernels-decompose-1.c
gcc/testsuite/c-c++-common/goacc/kernels-decompose-2.c
gcc/testsuite/gfortran.dg/goacc/kernels-decompose-1.f95
gcc/testsuite/gfortran.dg/goacc/kernels-decompose-2.f95
libgomp/testsuite/libgomp.oacc-c-c++-common/kernels-decompose-1.c
libgomp/testsuite/libgomp.oacc-fortran/pr94358-1.f90

index cbfe859310a04bc7757d4e3f8c316cb9105eec7f..8c55da373f81fab1a2b37f5f8e44bc1488226745 100644 (file)
@@ -464,6 +464,9 @@ Necessary when modifying @command{gperf} input files, e.g.@:
 @item DejaGnu 1.4.4
 @itemx Expect
 @itemx Tcl
+@c Once Tcl 8.5 or higher is required, remove any obsolete
+@c compatibility workarounds:
+@c     git grep 'compatibility with earlier Tcl releases'
 
 Necessary to run the GCC testsuite; see the section on testing for
 details.
index 92db33273ebc94d47fcd5501daad4f9ac7f8c17d..e906443cceb039cfe4d27b2551995801bd794777 100644 (file)
@@ -7,6 +7,14 @@
 
 /* See also '../../gfortran.dg/goacc/kernels-decompose-1.f95'.  */
 
+/* It's only with Tcl 8.5 (released in 2007) that "the variable 'varName'
+   passed to 'incr' may be unset, and in that case, it will be set to [...]",
+   so to maintain compatibility with earlier Tcl releases, we manually
+   initialize counter variables:
+   { dg-line l_dummy[variable c_loop_i 0] }
+   { dg-message "dummy" "" { target iN-VAl-Id } l_dummy } to avoid
+   "WARNING: dg-line var l_dummy defined, but not used".  */
+
 #define N 1024
 
 unsigned int a[N];
index ec6c4af92aa6504adb6e5d2c722013e0b94827a4..ec0f75c4a61023cdd5c228e08c1e1dd13c3c92ae 100644 (file)
@@ -6,6 +6,14 @@
 
 /* See also '../../gfortran.dg/goacc/kernels-decompose-2.f95'.  */
 
+/* It's only with Tcl 8.5 (released in 2007) that "the variable 'varName'
+   passed to 'incr' may be unset, and in that case, it will be set to [...]",
+   so to maintain compatibility with earlier Tcl releases, we manually
+   initialize counter variables:
+   { dg-line l_dummy[variable c_loop_i 0 c_loop_j 0 c_loop_k 0 c_part 0] }
+   { dg-message "dummy" "" { target iN-VAl-Id } l_dummy } to avoid
+   "WARNING: dg-line var l_dummy defined, but not used".  */
+
 #pragma acc routine gang
 extern int
 f_g (int);
index 95a78623ebf901c95494634ebba0fcfd87135b64..7e513f8408352d6558b210e27bae821ac6a1bfd7 100644 (file)
@@ -7,6 +7,14 @@
 
 ! See also '../../c-c++-common/goacc/kernels-decompose-1.c'.
 
+! It's only with Tcl 8.5 (released in 2007) that "the variable 'varName'
+! passed to 'incr' may be unset, and in that case, it will be set to [...]",
+! so to maintain compatibility with earlier Tcl releases, we manually
+! initialize counter variables:
+! { dg-line l_dummy[variable c_loop_i 0] }
+! { dg-message "dummy" "" { target iN-VAl-Id } l_dummy } to avoid
+! "WARNING: dg-line var l_dummy defined, but not used".
+
 program main
   implicit none
   integer, parameter         :: N = 1024
index 58d687d4a0c79aa9eb58616acbd20f16e1aeb0a3..22f65e5c6941ef2e17ff1524e09cbbba5d852fc6 100644 (file)
@@ -6,6 +6,14 @@
 
 ! See also '../../c-c++-common/goacc/kernels-decompose-2.c'.
 
+! It's only with Tcl 8.5 (released in 2007) that "the variable 'varName'
+! passed to 'incr' may be unset, and in that case, it will be set to [...]",
+! so to maintain compatibility with earlier Tcl releases, we manually
+! initialize counter variables:
+! { dg-line l_dummy[variable c_loop_i 0 c_loop_j 0 c_loop_k 0 c_part 0] }
+! { dg-message "dummy" "" { target iN-VAl-Id } l_dummy } to avoid
+! "WARNING: dg-line var l_dummy defined, but not used".
+
 program main
   implicit none
 
index fa8ae6c79cd0347b514fb9581986fdec7421ce0a..e76e4099f3a688c16f79ad1a14b4d164b7890363 100644 (file)
@@ -3,6 +3,14 @@
 /* { dg-additional-options "-fopt-info-omp-all" } */
 /* { dg-additional-options "-fopenacc-kernels=decompose" } */
 
+/* It's only with Tcl 8.5 (released in 2007) that "the variable 'varName'
+   passed to 'incr' may be unset, and in that case, it will be set to [...]",
+   so to maintain compatibility with earlier Tcl releases, we manually
+   initialize counter variables:
+   { dg-line l_dummy[variable c_loop_i 0] }
+   { dg-message "dummy" "" { target iN-VAl-Id } l_dummy } to avoid
+   "WARNING: dg-line var l_dummy defined, but not used".  */
+
 #undef NDEBUG
 #include <assert.h>
 
index 82d8351f0e396cf9d7e2c6526c978a186894fdd3..99a70418a4d100940bd251bf5dd3d2947e46b11c 100644 (file)
@@ -2,6 +2,14 @@
 ! { dg-additional-options "-fopt-info-omp-all" }
 ! { dg-additional-options "-fopenacc-kernels=decompose" }
 
+! It's only with Tcl 8.5 (released in 2007) that "the variable 'varName'
+! passed to 'incr' may be unset, and in that case, it will be set to [...]",
+! so to maintain compatibility with earlier Tcl releases, we manually
+! initialize counter variables:
+! { dg-line l_dummy[variable c_loop_i 0] }
+! { dg-message "dummy" "" { target iN-VAl-Id } l_dummy } to avoid
+! "WARNING: dg-line var l_dummy defined, but not used".
+
 subroutine kernel(lo, hi, a, b, c)
   implicit none
   integer :: lo, hi, i