Bug 1677652
Summary: | ppc64le: Double-to-float conversion uses wrong rounding mode when followed by memcpy | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 8 | Reporter: | Victor Stinner <vstinner> |
Component: | gcc | Assignee: | Marek Polacek <mpolacek> |
gcc sub component: | system-version | QA Contact: | Alexandra Petlanová Hájková <ahajkova> |
Status: | CLOSED ERRATA | Docs Contact: | |
Severity: | unspecified | ||
Priority: | unspecified | CC: | codonell, fweimer, jakub, mcermak, mpetlan, mpolacek, ohudlick, pviktori |
Version: | 8.1 | ||
Target Milestone: | rc | ||
Target Release: | 8.0 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | gcc-8.3.1-4.el8 | Doc Type: | No Doc Update |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2019-11-05 22:16:35 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | 1680182, 1682592 | ||
Bug Blocks: | 1639502, 1684553, 1684559 |
Description
Victor Stinner
2019-02-15 13:45:18 UTC
Any update on this bug? We need the fix for Python: bz#1639502. The upstream fix has been committed to 8.3, so the fix will be included in the next update from upstream. I'm not sure when exactly that will happen. Is this planned to be backported to RHEL 8.1.0? (In reply to Miro Hrončok from comment #3) > Is this planned to be backported to RHEL 8.1.0? Yes. In fact, I'm about to start the build; it should be available today. Excellent! Thank You. Hello Marek, there might be some problem, void f (double d, char *target) { float f = d; __builtin_memcpy (target, &f, sizeof (f)); } still results (with -O2) in stfs 1,0(4) blr for both gcc-8.3.1-4.4.el8.ppc64le and gcc-8.3.1-4.5.el8.ppc64le on power9. I think this is fine. The original bug report says "An frsp instruction is missing before the stfs." If I use gcc-8.2.1-3.5 (which doesn't have the fix), then compiling the testcase results in: f: .LFB0: .cfi_startproc stfs 1,0(4) blr whereas if I use gcc-8.3.1-4.5 (which has the fix): f: .LFB0: .cfi_startproc frsp 1,1 stfs 1,0(4) blr which has "frsp" before "stfs". Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2019:3565 |