SIGFPE with gcc 7.3.0 in sqlite3: fldl instruction underflow
Thomas De Schampheleire
patrickdepinguin@gmail.com
Wed Nov 28 10:39:00 GMT 2018
El lun., 26 nov. 2018 a las 15:50, Segher Boessenkool
(<segher@kernel.crashing.org>) escribió:
>
> Hi,
>
> On Mon, Nov 26, 2018 at 12:27:38PM +0100, Thomas De Schampheleire wrote:
> > El mié., 21 nov. 2018 a las 15:46, Thomas De Schampheleire
> > (<patrickdepinguin@gmail.com>) escribió:
> > Modified code is:
> >
> > if( fg & MEM_Int ){
> > sqlite3_snprintf(nByte, pMem->z, "%lld", pMem->u.i);
> > }else{
> > assert( fg & MEM_Real );
> > asm volatile("" ::: "memory");
> > sqlite3_snprintf(nByte, pMem->z, "%!.15g", pMem->u.r);
> > }
> >
> > My question now becomes: is gcc allowed to optimize here (without the barrier)?
> > Is gcc allowed to pre-load the floating point value pMem->u.r if it
> > does not know yet that the value in the union is a floating-point
> > value, knowing that a load of an invalid (integer) value could cause
> > floating-point exceptions like underflow?
>
> It depends on many things. We need to have some full, compilable source
> code; know which target exactly; exact compiler flags used; what you saw
> happen and why you think that is wrong. And then file it on
> https://gcc.gnu.org/bugzilla please.
>
Thanks, I posted at:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88240
More information about the Gcc-help
mailing list