testsuite/110763: Ensure zero return from test
commit386df7ce7b38ef00e28080a779ef2dfd6949cf15
authorSiddhesh Poyarekar <siddhesh@gotplt.org>
Fri, 21 Jul 2023 15:13:58 +0000 (21 11:13 -0400)
committerSiddhesh Poyarekar <siddhesh@gotplt.org>
Wed, 26 Jul 2023 11:42:53 +0000 (26 07:42 -0400)
tree102bcdfac61e829d30fa432c08c2d32460232394
parent8605bd9321010f15c471d511de5a06bbd9cc7c4b
testsuite/110763: Ensure zero return from test

The test deliberately reads beyond bounds to exersize ubsan and the
return value may be anything, based on previous allocations.  The OFF
test caters for it by ANDing the return with 0, do the same for the DYN
test.

gcc/testsuite/ChangeLog:

PR testsuite/110763
* gcc.dg/ubsan/object-size-dyn.c (dyn): New parameter RET.
(main): Use it.

Signed-off-by: Siddhesh Poyarekar <siddhesh@gotplt.org>
gcc/testsuite/gcc.dg/ubsan/object-size-dyn.c