diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2021-04-20 17:11:51 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2021-04-20 17:12:51 -0700 |
commit | 591f00666450e5e70514d457846af2c8d301af9b (patch) | |
tree | 9e1eca1a9d5840831f5235f315e71f552437f0d6 /tests/unictype/test-categ_Sm.c | |
parent | 9b8db75dbe7c33d5dc7eccee84f80c17c18223c1 (diff) | |
download | gnulib-591f00666450e5e70514d457846af2c8d301af9b.tar.gz |
malloc-gnu-tests, etc.: use volatile for clang
In some more test locations, store the result of malloc etc. into
a volatile pointer so that clang doesn’t optimize away the malloc
and thus bypass the test. This fixes a malloc-gnu test failure on
macOS 11.2.3 with clang 12.0.0 on ARM.
* tests/test-alloca-opt.c (do_allocation):
* tests/test-malloc-gnu.c (main):
* tests/test-malloca.c (do_allocation):
* tests/test-realloc-gnu.c (main):
* tests/test-reallocarray.c (main):
* tests/test-aligned-malloc.c (main):
* tests/test-aligned_alloc.c (main):
Store malloc etc. results into a volatile pointer.
Diffstat (limited to 'tests/unictype/test-categ_Sm.c')
0 files changed, 0 insertions, 0 deletions