Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1594975

Summary: Please backport fix for GCC bug 68814 to 4.8.5
Product: Red Hat Enterprise Linux 7 Reporter: Bill Schmidt <wschmidt>
Component: gccAssignee: Marek Polacek <mpolacek>
Status: CLOSED ERRATA QA Contact: Alexandra Petlanová Hájková <ahajkova>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.4CC: ahajkova, jakub, mcermak, mnewsome, ohudlick
Target Milestone: rc   
Target Release: ---   
Hardware: ppc64le   
OS: Linux   
Whiteboard:
Fixed In Version: gcc-4.8.5-38.el7 Doc Type: Bug Fix
Doc Text:
Cause: Using the number of bytes instead of the number of bits when determining if the destination and source of an RTL "SET" expression is the same. Consequence: Wrong instruction to be generated. Fix: Use bits instead of bytes. Result: Correct code is generated.
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-08-06 13:00:39 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: 1643040    

Description Bill Schmidt 2018-06-25 21:52:17 UTC
Description of problem: The fix for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68814
is needed in RHEL 7 (GCC 4.8.5) but was discovered after 4.8 went out of service.  This was discovered by a team at Nutanix.


Version-Release number of selected component (if applicable): 4.8.5


How reproducible:

#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>

static uint64_t __attribute__((noinline))
expand_value(uint64_t value)
{

 value &= 0xffffffff;
 value |= value << 32;

 return value;
}

int main(int argc, char **argv)
{

 if (argc > 1) {
   uint64_t v = strtoull(argv[1], NULL, 0);
   printf("%llx -> %llx\n", v, expand_value(v));
 }

 return 0;
}



Steps to Reproduce:
1. Compile the above program with -O2 -S.
2. Verify that the expand_value function compiles to nothing but a "blr" instruction.
3. Correct behavior with the patch is to also generate an rldimi instruction.

Actual results:

See step 2 above.

Expected results:

See step 3 above.

Additional info:  This is a simple fix to change an occurrence of BYTES_BIG_ENDIAN to BITS_BIG_ENDIAN in common code (rtlanal.c).

Comment 7 Alexandra Petlanová Hájková 2019-05-22 20:57:57 UTC
I verified reproducer from comment #0 contains rldimi instruction when compiled with  -O2 -S for gcc-4.8.5-39.el7.ppc64le and doesn't contain it for gcc-4.8.5-36.el7.ppc64le.

Comment 9 errata-xmlrpc 2019-08-06 13:00:39 UTC
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:2167