https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84309
Bug ID: 84309 Summary: [8 Regression] Wrong-code with -ffast-math Product: gcc Version: 8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: mpolacek at gcc dot gnu.org Target Milestone: --- Target: x86_64-pc-linux-gnu typedef __SIZE_TYPE__ size_t; double pow (double x, double y); double log2 (double x); int main () { size_t a = 1024; size_t b = 16 * 1024; size_t c = pow (2, (log2 (a) + log2 (b)) / 2); if (c != 4 * 1024) __builtin_abort (); return 0; } $ xgcc x.c -lm; ./a.out $ xgcc x.c -lm -ffast-math; ./a.out Aborted (core dumped)