guard created values from being optimized out (bnc#895964)

If  http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/60741 is accurate then this will not help, because we are not done using `res` and after this function returns, it may be placed in a register and lost during GC.