[committed] testsuite: Fix up target-enter-data-1.c on 32-bit targets
Checks
Commit Message
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
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
@@ -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" } } */