On 09/19/2016 03:08 PM, Bernd Edlinger wrote:
Would it work to break this up into distinct tests, exit()-ing from each
function rather than returning back to main?
Yes. I think how this test is designed, each function must be inlined,
or it will fail anyway. It was for instance impossible to pass the
ubsan test, if -fno-inline was used as RUNTESTFLAGS.
Presumably the dg-skip-if is ensuring that we're only testing with -O2
turned on.
Therefore it works as well, if main avoids to return and calls
exit(0) instead, with a specific comment of course.
See https://gcc.gnu.org/ml/gcc-patches/2016-08/msg01985.html
That works for me.
jeff