delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2019/05/10/09:50:33

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:from:to:subject:date:message-id:references
:in-reply-to:mime-version:content-type
:content-transfer-encoding; q=dns; s=default; b=Q4NVg1RRL6Hkeu/p
VRvohWqPbS6QgKQbOp/J3hUWSE5FpeY1ctNcJMMbAGjc4h9EvbiKwfAi4JJ5+IG4
kYATeygb5QHSIyxfMwwckN0ke73Y/JJoJvPzPFeisMQ6+weaqpV9Q9Kk/7Ynwooi
fSBRqydI2Ozvkdjegh9Nyo1dR0E=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:from:to:subject:date:message-id:references
:in-reply-to:mime-version:content-type
:content-transfer-encoding; s=default; bh=XLFS9FytAdEgJPeClB5vly
WpKDw=; b=EEog5PvTd2bVJ81U9jfNeOe3i3NzQX+EIx33UVxqo4qCZUaQZ/hQOL
ZEPtBsEDK1f1fspB4WSKoIhiX6GLklc1hWJJCbtWENBtsudtCfeVTrEd7XC6DagI
B7XU8ZgsOGnItCXcdG2u7Wa5axRU+uAlO/G3ucfDtHjIoj+3ZKbcE=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 spammy=H*c:alternative, H*c:HHH
X-HELO: EUR02-VE1-obe.outbound.protection.outlook.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Fl/xZigbRWGuM4Ft6UlSw4jEg+OsPbzxM0UAaODMN/A=; b=lPbfLWSMxxnzdE/3fge0muBKCjB+wyvnuJZjYUhi1Z5Uyv+WrGF37ghHo2Vt4lhP5onlub6GsQ3p1KgrgQPv/IFEs1lcxmWAlTYQXRTqDn4Vpe5snDyBe9aZq2gvlDSode2YhmkisGxmJPuTinTzDfWqpCqftHsR7nc5wu+7M2JIYMFiP+WZZC/1F71oHmbqKhA53AGnz3/iz9ftu6QYPHbIfruxyAD0D3Uvkgppo5SUYdXdj/Kb+71cn6GsuazNnth1Rgiu5RfbvJg9d7tSPxhf/s5MUqnqMJQ2tVuhi7OE8Izeo0bnDy9kQfQvDyUfPWQEQFSXQTgBaSciR1Qthg==
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>
Subject: Re: Bug report. Clang sqrtl(-1) causes access violation
Date: Fri, 10 May 2019 13:50:16 +0000
Message-ID: <DB7PR01MB53860FB36CC45154C5862E99DE0C0@DB7PR01MB5386.eurprd01.prod.exchangelabs.com>
References: <c80240c2-a30e-41b5-7635-cf31f54741d1 AT agner DOT org>
In-Reply-To: <c80240c2-a30e-41b5-7635-cf31f54741d1@agner.org>
MIME-Version: 1.0
X-IsSubscribed: yes
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id x4ADoWUH032071

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 AT HOR711318E /cygdrive/c/source/c++/cygwin
$ clang sqrt.cpp

e608313 AT HOR711318E /cygdrive/c/source/c++/cygwin
$ ls
a.exe  a.exe.stackdump  ATT00001.txt  cygcheck.out  sqrt.cpp

e608313 AT HOR711318E /cygdrive/c/source/c++/cygwin
$ ./a.exe
-1.000000

e608313 AT 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 AT 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 AT 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


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019