public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Jose Isaias Cabrera <jicman@outlook.com>
To: Agner Fog <agner@agner.org>, "cygwin@cygwin.com" <cygwin@cygwin.com>
Subject: Re: Bug report. Clang sqrtl(-1) causes access violation
Date: Fri, 10 May 2019 13:50:00 -0000	[thread overview]
Message-ID: <DB7PR01MB53860FB36CC45154C5862E99DE0C0@DB7PR01MB5386.eurprd01.prod.exchangelabs.com> (raw)
In-Reply-To: <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

  parent reply	other threads:[~2019-05-10 13:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-10 12:58 Agner Fog
2019-05-10 13:38 ` Sam Habiel
2019-05-10 14:04   ` Franz Fehringer
2019-05-10 13:50 ` Jose Isaias Cabrera [this message]
2019-05-10 19:44   ` Agner Fog
2019-05-10 19:54     ` Jose Isaias Cabrera
2019-05-10 20:56       ` Agner Fog
2019-05-11  3:33         ` Jose Isaias Cabrera
2019-06-03 11:11 ` Corinna Vinschen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DB7PR01MB53860FB36CC45154C5862E99DE0C0@DB7PR01MB5386.eurprd01.prod.exchangelabs.com \
    --to=jicman@outlook.com \
    --cc=agner@agner.org \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).