[committed] testsuite: Fix up target-enter-data-1.c on 32-bit targets

Message ID ZXqrcOiMerjD2VnT@tucnak
State Unresolved
Headers
Series [committed] testsuite: Fix up target-enter-data-1.c on 32-bit targets |

Checks

Context Check Description
snail/gcc-patch-check warning Git am fail log

Commit Message

Jakub Jelinek Dec. 14, 2023, 7:14 a.m. UTC
  On Wed, Nov 29, 2023 at 11:43:05AM +0000, Julian Brown wrote:
> 	* c-c++-common/gomp/target-enter-data-1.c: Adjust scan output.

struct bar { int num_vectors; double *vectors; };

is 16 bytes only on 64-bit targets, on 32-bit ones it is just 8 bytes,
so the explicit matching of the * 16 multiplication only works on the
former.

Tested on x86_64-linux -m32/-m64, committed to trunk.

2023-12-14  Jakub Jelinek  <jakub@redhat.com>

	* c-c++-common/gomp/target-enter-data-1.c: Match also sizeof bar on
	32-bit targets - 8 bytes - rather than just 16 bytes.



	Jakub
  

Comments

Julian Brown Dec. 14, 2023, 10:09 a.m. UTC | #1
On Thu, 14 Dec 2023 08:14:56 +0100
Jakub Jelinek <jakub@redhat.com> wrote:

> On Wed, Nov 29, 2023 at 11:43:05AM +0000, Julian Brown wrote:
> > 	* c-c++-common/gomp/target-enter-data-1.c: Adjust scan
> > output.  
> 
> struct bar { int num_vectors; double *vectors; };
> 
> is 16 bytes only on 64-bit targets, on 32-bit ones it is just 8 bytes,
> so the explicit matching of the * 16 multiplication only works on the
> former.
> 
> Tested on x86_64-linux -m32/-m64, committed to trunk.

That was quick, thank you! Apologies for the breakage.

Julian
  

Patch

--- gcc/testsuite/c-c++-common/gomp/target-enter-data-1.c.jj	2023-12-14 07:49:53.364577887 +0100
+++ gcc/testsuite/c-c++-common/gomp/target-enter-data-1.c	2023-12-14 08:08:59.680964433 +0100
@@ -22,4 +22,4 @@  void func (struct foo *f, int n, int m)
 }
 
 /* { dg-final { scan-tree-dump-times {map\(struct:\*f \[len: 1\]\) map\(alloc:[a-z0-9\._]+->vectors \[len: 0\]\) map\(to:\*_[0-9]+ \[len: _[0-9]+\]\) map\(attach:[a-z0-9\._]+->vectors \[bias: [^\]]+\]\) map\(attach:\*_[0-9]+ \[bias: _[0-9]+\]\)} 1 "gimple" } } */
-/* { dg-final { scan-tree-dump-times {map\(struct:\*\(f->bars \+ \(sizetype\) \(\([^\)]+\) n \* 16\)\) \[len: 1\]\) map\(alloc:[a-z0-9\._]+->vectors \[len: 0\]\) map\(to:\*_[0-9]+ \[len: _[0-9]+\]\) map\(attach:[a-z0-9\._]+->vectors \[bias: [^\]]+\]\)} 2 "gimple" } } */
+/* { dg-final { scan-tree-dump-times {map\(struct:\*\(f->bars \+ \(sizetype\) \(\([^\)]+\) n \* (?:16|8)\)\) \[len: 1\]\) map\(alloc:[a-z0-9\._]+->vectors \[len: 0\]\) map\(to:\*_[0-9]+ \[len: _[0-9]+\]\) map\(attach:[a-z0-9\._]+->vectors \[bias: [^\]]+\]\)} 2 "gimple" } } */