testsuite: adjust gomp test for x86 -m32

Message ID orsf5gi6gz.fsf@lxoliva.fsfla.org
State Accepted
Headers
Series testsuite: adjust gomp test for x86 -m32 |

Checks

Context Check Description
snail/gcc-patch-check success Github commit url

Commit Message

Alexandre Oliva Nov. 8, 2023, 3:56 p.m. UTC
  declare-target-3.C expects .quad for entries in offload_var_table, but
the entries are pointer-wide, so 32-bit targets use .long instead.
Accept both.

Regstrapped on x86_64-linux-gnu, also tested with gcc-13 on i686- and
x86_64-.  Ok to install?

for  gcc/testsuite/ChangeLog

	* g++.dg/gomp/declare-target-3.C: Adjust for 32-bit targets.
---
 gcc/testsuite/g++.dg/gomp/declare-target-3.C |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
  

Comments

Jakub Jelinek Nov. 8, 2023, 4:05 p.m. UTC | #1
On Wed, Nov 08, 2023 at 12:56:44PM -0300, Alexandre Oliva wrote:
> 
> declare-target-3.C expects .quad for entries in offload_var_table, but
> the entries are pointer-wide, so 32-bit targets use .long instead.
> Accept both.
> 
> Regstrapped on x86_64-linux-gnu, also tested with gcc-13 on i686- and
> x86_64-.  Ok to install?
> 
> for  gcc/testsuite/ChangeLog
> 
> 	* g++.dg/gomp/declare-target-3.C: Adjust for 32-bit targets.

Ok (though, I wonder if it isn't sa .4byte or .8byte etc. on even other
targets).

> --- a/gcc/testsuite/g++.dg/gomp/declare-target-3.C
> +++ b/gcc/testsuite/g++.dg/gomp/declare-target-3.C
> @@ -22,10 +22,10 @@ int *g = &f;	// Explicitly marked
>  // { dg-final { scan-tree-dump "__attribute__\\\(\\\(omp declare target\\\)\\\)\\\nint bar \\\(\\\)" "gimple" } }
>  // { dg-final { scan-tree-dump "__attribute__\\\(\\\(omp declare target\\\)\\\)\\\nint baz \\\(\\\)" "gimple" } }
>  // { dg-final { scan-tree-dump "__attribute__\\\(\\\(omp declare target\\\)\\\)\\\nint qux \\\(\\\)" "gimple" } }
> -// { dg-final { scan-assembler-not "\\\.offload_var_table:\\n.+\\\.quad\\s+a" { target { offloading_enabled } } } }
> -// { dg-final { scan-assembler "\\\.offload_var_table:\\n.+\\\.quad\\s+b" { target { offloading_enabled } } } }
> -// { dg-final { scan-assembler "\\\.offload_var_table:\\n.+\\\.quad\\s+c" { target { offloading_enabled } } } }
> -// { dg-final { scan-assembler "\\\.offload_var_table:\\n.+\\\.quad\\s+d" { target { offloading_enabled } } } }
> -// { dg-final { scan-assembler "\\\.offload_var_table:\\n.+\\\.quad\\s+e" { target { offloading_enabled } } } }
> -// { dg-final { scan-assembler "\\\.offload_var_table:\\n.+\\\.quad\\s+f" { target { offloading_enabled } } } }
> -// { dg-final { scan-assembler "\\\.offload_var_table:\\n.+\\\.quad\\s+g" { target { offloading_enabled } } } }
> +// { dg-final { scan-assembler-not "\\\.offload_var_table:\\n.+\\\.(quad|long)\\s+a" { target { offloading_enabled } } } }
> +// { dg-final { scan-assembler "\\\.offload_var_table:\\n.+\\\.(quad|long)\\s+b" { target { offloading_enabled } } } }
> +// { dg-final { scan-assembler "\\\.offload_var_table:\\n.+\\\.(quad|long)\\s+c" { target { offloading_enabled } } } }
> +// { dg-final { scan-assembler "\\\.offload_var_table:\\n.+\\\.(quad|long)\\s+d" { target { offloading_enabled } } } }
> +// { dg-final { scan-assembler "\\\.offload_var_table:\\n.+\\\.(quad|long)\\s+e" { target { offloading_enabled } } } }
> +// { dg-final { scan-assembler "\\\.offload_var_table:\\n.+\\\.(quad|long)\\s+f" { target { offloading_enabled } } } }
> +// { dg-final { scan-assembler "\\\.offload_var_table:\\n.+\\\.(quad|long)\\s+g" { target { offloading_enabled } } } }

	Jakub
  

Patch

diff --git a/gcc/testsuite/g++.dg/gomp/declare-target-3.C b/gcc/testsuite/g++.dg/gomp/declare-target-3.C
index 1e23c8633acac..b0a90d8d31f50 100644
--- a/gcc/testsuite/g++.dg/gomp/declare-target-3.C
+++ b/gcc/testsuite/g++.dg/gomp/declare-target-3.C
@@ -22,10 +22,10 @@  int *g = &f;	// Explicitly marked
 // { dg-final { scan-tree-dump "__attribute__\\\(\\\(omp declare target\\\)\\\)\\\nint bar \\\(\\\)" "gimple" } }
 // { dg-final { scan-tree-dump "__attribute__\\\(\\\(omp declare target\\\)\\\)\\\nint baz \\\(\\\)" "gimple" } }
 // { dg-final { scan-tree-dump "__attribute__\\\(\\\(omp declare target\\\)\\\)\\\nint qux \\\(\\\)" "gimple" } }
-// { dg-final { scan-assembler-not "\\\.offload_var_table:\\n.+\\\.quad\\s+a" { target { offloading_enabled } } } }
-// { dg-final { scan-assembler "\\\.offload_var_table:\\n.+\\\.quad\\s+b" { target { offloading_enabled } } } }
-// { dg-final { scan-assembler "\\\.offload_var_table:\\n.+\\\.quad\\s+c" { target { offloading_enabled } } } }
-// { dg-final { scan-assembler "\\\.offload_var_table:\\n.+\\\.quad\\s+d" { target { offloading_enabled } } } }
-// { dg-final { scan-assembler "\\\.offload_var_table:\\n.+\\\.quad\\s+e" { target { offloading_enabled } } } }
-// { dg-final { scan-assembler "\\\.offload_var_table:\\n.+\\\.quad\\s+f" { target { offloading_enabled } } } }
-// { dg-final { scan-assembler "\\\.offload_var_table:\\n.+\\\.quad\\s+g" { target { offloading_enabled } } } }
+// { dg-final { scan-assembler-not "\\\.offload_var_table:\\n.+\\\.(quad|long)\\s+a" { target { offloading_enabled } } } }
+// { dg-final { scan-assembler "\\\.offload_var_table:\\n.+\\\.(quad|long)\\s+b" { target { offloading_enabled } } } }
+// { dg-final { scan-assembler "\\\.offload_var_table:\\n.+\\\.(quad|long)\\s+c" { target { offloading_enabled } } } }
+// { dg-final { scan-assembler "\\\.offload_var_table:\\n.+\\\.(quad|long)\\s+d" { target { offloading_enabled } } } }
+// { dg-final { scan-assembler "\\\.offload_var_table:\\n.+\\\.(quad|long)\\s+e" { target { offloading_enabled } } } }
+// { dg-final { scan-assembler "\\\.offload_var_table:\\n.+\\\.(quad|long)\\s+f" { target { offloading_enabled } } } }
+// { dg-final { scan-assembler "\\\.offload_var_table:\\n.+\\\.(quad|long)\\s+g" { target { offloading_enabled } } } }