From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 88F01384645B; Wed, 3 Apr 2024 19:28:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 88F01384645B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1712172502; bh=Gy6GIP874GtANPmH4UUf92aQD4dszI/Bm6WqqH8XTqE=; h=From:To:Subject:Date:From; b=hook8N/IcVKGuYUOJCxM8tEk+pgys9NoMdm6Mprbd6ssDRgXp3x+b+JxoBFOM8smu cGt1G88cW0DnahO3c1CTKMeB0Fsxc8bUTUvbohU7esrIr8jMzGFC0HC6UEmthVBdDF 4dnciXhzZ9ssm1LT6j99Pggum7g7NXhiPiTbbFVo= From: "adhemerval.zanella at linaro dot org" To: glibc-bugs@sourceware.org Subject: [Bug math/31603] New: math: x86 trunc traps when FE_INEXACT is enabled Date: Wed, 03 Apr 2024 19:28:22 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: math X-Bugzilla-Version: 2.39 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: adhemerval.zanella at linaro dot org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D31603 Bug ID: 31603 Summary: math: x86 trunc traps when FE_INEXACT is enabled Product: glibc Version: 2.39 Status: NEW Severity: normal Priority: P2 Component: math Assignee: unassigned at sourceware dot org Reporter: adhemerval.zanella at linaro dot org Target Milestone: --- The implementations of trunc functions using x87 floating point (i386 and x86_64 long double only) traps when FE_INEXACT is enabled. Although this is= a GNU extension outside the scope of the C standard, other architectures that also support traps do not show this behavior (aarch64, powerpc64). The following test shows that issue: $ cat test-ceil.c #include #include #include int main (int argc, char *argv[]) { feenableexcept (FE_INEXACT); volatile long double a =3D 1.5; volatile long double b __attribute__ ((unused)); b =3D truncl (a); assert (fegetexcept () =3D=3D FE_INEXACT); return 0; } $ gcc -Wall -D_GNU_SOURCE test-ceil.c -lm && ./a.out Floating point exception (core dumped) --=20 You are receiving this mail because: You are on the CC list for the bug.=