]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite: Fix up target-enter-data-1.c on 32-bit targets
authorJakub Jelinek <jakub@redhat.com>
Thu, 14 Dec 2023 07:10:48 +0000 (08:10 +0100)
committerJakub Jelinek <jakub@redhat.com>
Thu, 14 Dec 2023 07:10:48 +0000 (08:10 +0100)
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.

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.

gcc/testsuite/c-c++-common/gomp/target-enter-data-1.c

index 4913d338e5f9d653beb773e243e23946a62a0417..3e5d5c76bb0c8df904b3754ce7baaed803cbfc4a 100644 (file)
@@ -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" } } */