This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Bug report. Clang sqrtl(-1) causes access violation
- From: Jose Isaias Cabrera <jicman at outlook dot com>
- To: Agner Fog <agner at agner dot org>, "cygwin at cygwin dot com" <cygwin at cygwin dot com>
- Date: Fri, 10 May 2019 13:50:16 +0000
- Subject: Re: Bug report. Clang sqrtl(-1) causes access violation
- References: <c80240c2-a30e-41b5-7635-cf31f54741d1@agner.org>
Agner Fog, on Friday, May 10, 2019 08:57 AM, wrote...
>
>Bug description:
>
>The sqrtl function under Clang causes an access violation when the
>argument is negative.
>
>This error occurs only under Cygwin.
>
>This error occurs only with the sqrtl function, not with sqrt or sqrtf
>
It works for me.
e608313@HOR711318E /cygdrive/c/source/c++/cygwin
$ clang sqrt.cpp
e608313@HOR711318E /cygdrive/c/source/c++/cygwin
$ ls
a.exe a.exe.stackdump ATT00001.txt cygcheck.out sqrt.cpp
e608313@HOR711318E /cygdrive/c/source/c++/cygwin
$ ./a.exe
-1.000000
e608313@HOR711318E /cygdrive/c/source/c++/cygwin
$ uname -a
CYGWIN_NT-6.1 HOR711318E 3.0.7(0.338/5/3) 2019-04-30 18:04 i686 Cygwin
e608313@HOR711318E /cygdrive/c/source/c++/cygwin
$ clang --version
clang version 5.0.1 (tags/RELEASE_501/final)
Target: i686-pc-windows-cygnus
Thread model: posix
InstalledDir: /usr/bin
e608313@HOR711318E /cygdrive/c/source/c++/cygwin
$ cat sqrt.cpp
#include <stdio.h>
#include <math.h>
float a = -1.f;
int main() {
float b = sqrtl(a);
printf("%f\n", b);
return 0;
}
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple