http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59556
Bug ID: 59556 Summary: Floating-point __sec_reduce_add tests not robust in face of contraction Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: testsuite Assignee: unassigned at gcc dot gnu.org Reporter: bhaveet.shah at arm dot com If fused-mac is available on the target, the following __sec_reduce_add (taken from gcc/testsuite/c-c++-common/cilk-plus/AN/builtin_func_double.c) on a floating-point type could be implemented using a fused-mac: x = __sec_reduce_add (array3[:] * array4[:]); The test cases also contain the following loop: add_value = 0.0000; mul_value = 1.0000; for (ii = 0; ii < 10; ii++) { add_value += (array3[ii] * array4[ii]); mul_value *= (array3[ii] * array4[ii]); } In this case, a compiler could reasonably do the multiply and addition separately so that the multiply result could be used for both add_value and mul_value. If the semantics of the fused-mac and the separate instructions are not equivalent, the result from this loop could be different compared to the __sec_reduce_add case. The test compares the results of these two using a bitwise comparison, hence this test will fail. This test case should be made more robust to handle this case.