This one should not abort: #include <math.h> #include <stdlib.h>
int main() { double x = -1.0; if (sqrt(pow(x,2)) != 1.0) abort(); return 0; } but both, 3.4.4 and 4.0.0 do sqrt(pow(x,y)) -> pow(x,y*0.5) which in this case means sqrt(1.0) -> -1.0. Ouch. -- Summary: [3.3 regression] sqrt(pow(x,y)) != pow(x,y*0.5) Product: gcc Version: 3.4.4 Status: UNCONFIRMED Severity: normal Priority: P2 Component: middle-end AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: rguenth at tat dot physik dot uni-tuebingen dot de CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19775