Fix libgfortran FMA3/FMA4 tests

Thomas Koenig tkoenig@netcologne.de
Sun May 28 18:56:00 GMT 2017


Hi Rainer,

> It turns out that the FMA3 and FMA4 tests in acinclude.m4 don't test
> what they claim to:  if one compiles the test program
> 
> float
> flt_mul_add (float a, float b, float c)
> {
> 	return __builtin_fmaf (a, b, c);
> }
> 
> with -O2 -mfma -mno-fma4 (FMA3) resp. -O2 -mfma4 -mno-fma (FMA4), both
> boil done to
> 
> flt_mul_add:
>          jmp     fmaf
> 
> so the test always succeeds.
> 
> The following patch fixes this by instead using the tests from
> gcc.target/i386/i386.exp.  While the FMA3 test still passes with
> /bin/as, the FMA4 one fails, avoiding the breakage.
> 
> Bootstrapped on i386-pc-solaris2.12 with both as and gas without
> regressions.
> 
> Ok for mainline?

OK, and thanks a lot for the patch!

I hope this is the last fallout from the AMD patchess...

Regards

	Thomas



More information about the Fortran mailing list