------- Comment #3 from whaley at cs dot utsa dot edu 2006-12-18 21:16 ------- BTW, in case it isn't obvious, here's the fix that I typically use for problems like bug 323 that I cannot when it is gcc itself that is unpredictably spilling the computation:
void test(double x, double y) { const double y2 = x + 1.0; volatile double v[2]; v[0] = y2; v[1] = y; if (v[0] != v[1]) printf("error\n"); } The idea being that the volatile keyword prevents gcc from getting rid of the store/load cycle, which forces the round-down. This allows me to still do this kind of comparison, w/o the speed loss of associated with -ffloat-store (the compare itself becomes slow due to the store/load, but the body of the code runs as fast as normal), or the loss of precision associated with always rounding to 64 bit, as when you change the x87 control word. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30255 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]