Fix issue12118: Return value/use extra::test::black_box in benchmarks that are optimised to nothing

A try to fix issue 12118.
@huonw Could you please review that.