Not sure this "random" aswer explains it:
So
your "bug" example, I would say that it's not a bug. Using optimization
in one of the cases the compiler can figure out, that the value is 1,
by analyzing constant values assigned to v2 and lazy expanding the
expression (template expansions, etc), (which is correct math value).
The other option v1, uses
memory storage, and because of that, it cannot lazy expand the
expression at the function call, so because you cannot store 1/3
perfectly in 64 bits, after multiplying it, it always results in a
number lower 1.