[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: an evil memcpy() optimizer bug! (egcs-1.1.2, alphaev6, linux)



"Wes Bauske" <wsb@paralleldata.com> writes:

> Try modifying your code to pass the address of a double rather 
> than the double itself and see if you still can create the
> problem. I've seen problems passing floats/doubles to functions
> rather than their addresses. I just pass the address instead.

As you may have noticed, I didn't talk about workaround - there are
many of them. The one, I'm using now is that I have a temporary
volatile double v2 in put_f8() and I copy v into v2 and use the
latter. Other possible workarounds include, compiling put_f8() with
optimization turned off (it is not time-critical), or using manual
'for' loop, rather than memcpy().


-- 
Alexander L. Belikoff
Bloomberg L.P. / BFM Financial Research Ltd.
abel@vallinor4.com, abel@bfr.co.il



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []