Bug 1619354
Summary: | wrong result when compiled with -funroll-loops | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Dan Horák <dan> | ||||
Component: | gcc | Assignee: | Jakub Jelinek <jakub> | ||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | unspecified | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 31 | CC: | bugproxy, dan, davejohansen, dmalcolm, fweimer, hannsj_uhl, jakub, jwakely, law, mpolacek, msebor, nickc | ||||
Target Milestone: | --- | Keywords: | Patch | ||||
Target Release: | --- | ||||||
Hardware: | s390x | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | If docs needed, set a value | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | |||||||
: | 1652016 (view as bug list) | Environment: | |||||
Last Closed: | 2020-08-10 14:38:20 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: | |||||||
Bug Blocks: | 467765 | ||||||
Attachments: |
|
Description
Dan Horák
2018-08-20 15:10:30 UTC
Seems it's affecting only s390x, this came from our CI for jemalloc that checks also armv7, aarch64, ppc64, ppc64le and x86_64. The error message from running the test case is Failed assertion: (pow2_ceil_u32(((uint32_t)1) << i)) == (((uint32_t)1) << i) --> 1 != 2: Unexpected result, i=1 Have you tried -fsanitize=undefined? I've tried now and nothing is reported [sharkcz@devel10 ~]$ gcc -std=gnu11 -Wall -pipe -g3 -O2 -funroll-loops -fsanitize=undefined -o t t.c [sharkcz@devel10 ~]$ ./t Failed assertion: (pow2_ceil_u32(((uint32_t)1) << i)) == (((uint32_t)1) << i) --> 1 != 2: Unexpected result, i=1 for the record, the generic pow2_ceil() produces correct results in the test ------- Comment From Andreas.Krebbel.com 2018-11-20 11:23 EDT------- This is a bug in the clztidi2 pattern in the S/390 backend of GCC. I've just committed a patch to mainline. https://gcc.gnu.org/ml/gcc-patches/2018-11/msg01736.html Although it appears to be quite difficult to trigger this probably should be backported to basically all distro levels currently in use :( Hanns, I guess it makes sense to clone this bug for RHEL gcc too. (In reply to Dan Horák from comment #7) > Hanns, I guess it makes sense to clone this bug for RHEL gcc too. . Hello Dan, ... agree ... ... please go ahead cloning this bugzilla to the related RHEL releases ... Thanks for your attention and support. This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle. Changing version to '31'. This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle. Changing version to 31. |