-----Original Message----- 
From: JonY
Sent: Monday, October 07, 2013 12:00 AM
To: [email protected]
Subject: Re: [Mingw-w64-public] quadmath.h's expq() crashes at runtime.

> On 10/6/2013 20:31, [email protected] wrote:
> > Hi,
> >
> > Here's the simple demo:
> >
> > /***************************
> > #include <quadmath.h>
> >
> > int main (void) {
> >   __float128 r;
> >   r = expq(2.0Q);
> >   return 0;
> > }
> >
> > ***************************/
> >
> > With recent MinGW64 ports of gcc, that program builds ok, but running it
> > results in a crash.
> > Seems to happen with 4.6.3, 4.7.0 and 4.8.1 (both 32-bit and 64-bit
> > versions); I haven't tried any other versions.
> >
> > No such problem with mingw.org's gcc-4.7.0, nor with gcc-4.6.3 on 
> > Ubuntu.
> >
>
> Confirmed:
>
> Program received signal SIGSEGV, Segmentation fault.
> fesetenv (envp=envp@entry=0x28fe40) at ../misc/fesetenv.c:59
> 59              __asm__ volatile ("ldmxcsr %0" : : "m" (_mxcsr));
> (gdb) list
> 54            env.__unused1 = 0xffff;
> 55            __asm__ volatile ("fldenv %0" : : "m" (env)
> 56                              : "st", "st(1)", "st(2)", "st(3)", 
> "st(4)",
> 57                              "st(5)", "st(6)", "st(7)");
> 58            if (__mingw_has_sse ())
> 59              __asm__ volatile ("ldmxcsr %0" : : "m" (_mxcsr));
> 60          }
> 61
> 62        return 0;
> 63      }
> (gdb) p _mxcsr
> $1 = -1
>
> I'm not too clear what the asm code mean, Kai?

I guess I should file a bug report about this, so that it doesn't get lost.
Where's the place for that ?

Cheers,
Rob 


------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to