On Thu, Jul 3, 2014 at 11:42 AM, FX <fxcoud...@gmail.com> wrote: >> (I don't think -O0 is needed, but have to check with a testsuite run.) > > On x86_64-apple-darwin, -O0 or -O1 are needed: at -O2 my “use_real” call is > optimized out anyway, and the division simplified at compile time.
You can mark variables with: real, volatile :: x double precision, volatile :: y and you don't even need the call to use_real anymore. I have tested on alpha that this approach works for all optimization levels. Uros.