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 <ja...@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.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" } } */ Jakub