This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: optimization/7175: Calculation yields different results for versionoptimized with -O2


http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7175

The moment you will add at the beginning of your main():
 fpu_control_t fpu_bits;
 _FPU_GETCW(fpu_bits);
 fpu_bits &= ~_FPU_EXTENDED;
 fpu_bits |= _FPU_DOUBLE;
 _FPU_SETCW(fpu_bits);

Assuming you init "res" to zeros, you are goint to get a consistent
result.
This probably means that this PR is basically the same as PR/6914.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]