Optimization bug with floating-point?
Steve Kargl
sgk at troutmask.apl.washington.edu
Wed Mar 13 15:16:38 UTC 2019
On Tue, Mar 12, 2019 at 07:45:41PM -0700, Steve Kargl wrote:
>
> gcc8 --version
> gcc8 (FreeBSD Ports Collection) 8.3.0
>
> gcc8 -fno-builtin -o z a.c -lm && ./z
> gcc8 -O -fno-builtin -o z a.c -lm && ./z
> gcc8 -O2 -fno-builtin -o z a.c -lm && ./z
> gcc8 -O3 -fno-builtin -o z a.c -lm && ./z
>
> Max ULP: 2.297073
> Count: 0 (# of ULP that exceed 21)
>
clang agrees with gcc8 if one changes ...
> int
> main(void)
> {
> double re, im, u, ur, ui;
> float complex f;
> float x, y;
this line to "volatile float x, y".
--
Steve
More information about the freebsd-current
mailing list