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 1546728

Summary: Build of qemu-kvm fails on ppc64 due to internal compiler error
Product: Red Hat Enterprise Linux 7 Reporter: Miroslav Rezanina <mrezanin>
Component: gccAssignee: Marek Polacek <mpolacek>
Status: CLOSED ERRATA QA Contact: Michael Petlan <mpetlan>
Severity: high Docs Contact: Vladimír Slávik <vslavik>
Priority: unspecified    
Version: 7.5CC: bugproxy, ddepaula, famz, hannsj_uhl, jakub, jen, lvivier, mcermak, mpolacek, mrezanin, muriloo, ohudlick, vslavik
Target Milestone: rc   
Target Release: 7.6   
Hardware: powerpc   
OS: Linux   
Whiteboard:
Fixed In Version: gcc-4.8.5-30.el7 Doc Type: Bug Fix
Doc Text:
Previously, GCC could crash on the PowerPC 64-bit architecture when trying to convert a vector shift-by-scalar into a shift-by-vector, because it used the wrong machine mode for the shift amount. This bug has been fixed and the shift amount now has the correct mode, so the conversion works and the code compiles without crashing.
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-30 07:27:17 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: 1505884, 1507957, 1513404, 1528344    
Attachments:
Description Flags
preprocessed source causing error.
none
tcg-runtime-gvec.i none

Description Miroslav Rezanina 2018-02-19 12:50:16 UTC
Description of problem:

When building latest upstream QEMU on ppc64le architecture build fails with following error:


/root/weekly/qemu-kvm/accel/tcg/tcg-runtime-gvec.c: In function ‘helper_gvec_shl8i’:
/root/weekly/qemu-kvm/accel/tcg/tcg-runtime-gvec.c:558:26: internal compiler error: in emit_move_insn, at expr.c:3495
         *(vec8 *)(d + i) = (*(vec8 *)(a + i) << shift);

Preprocessed source attached.

Comment 2 Jeff Nelson 2018-02-19 23:10:50 UTC
Can you provide the attachment?

Comment 3 Miroslav Rezanina 2018-02-20 04:13:51 UTC
Created attachment 1398070 [details]
preprocessed source causing error.

Comment 4 Miroslav Rezanina 2018-02-20 04:14:46 UTC
Sorry, not sure why wasn't attachment added (added in form for new bug).

Comment 5 Marek Polacek 2018-02-20 14:27:54 UTC
I'll see if I can bisect it but I'm afraid it's too late for 7.5.

Comment 6 Marek Polacek 2018-02-20 16:26:27 UTC
Fixed by http://gcc.gnu.org/r227444.   Seems backportable.

Comment 8 Laurent Vivier 2018-03-29 06:59:01 UTC
Reproducer:

-- r.c -----8<--------------------------------------------------
typedef unsigned char U1 __attribute__((vector_size(16)));
typedef unsigned short U2 __attribute__((vector_size(16)));
typedef unsigned int U4 __attribute__((vector_size(16)));
typedef unsigned long long U8 __attribute__((vector_size(16)));
void helper(void *d, void *a, int shift, int i);
void helper(void *d, void *a, int shift, int i)
{
  *(U1 *)(d + i) = *(U1 *)(a + i) << shift;
  *(U2 *)(d + i) = *(U2 *)(a + i) << shift;
  *(U4 *)(d + i) = *(U4 *)(a + i) << shift;
  *(U8 *)(d + i) = *(U8 *)(a + i) << shift;
}
-- r.c -----8<--------------------------------------------------

$ cc -c -o r.o r.c
r.c: In function ‘helper’:
r.c:8:35: internal compiler error: in emit_move_insn, at expr.c:3495
   *(U1 *)(d + i) = *(U1 *)(a + i) << shift;
                                   ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
Preprocessed source stored into /tmp/ccpJ2XXm.out file, please attach this to your bugreport.

Comment 12 Matt Newsome 2018-04-16 20:47:26 UTC
*** Bug 1565536 has been marked as a duplicate of this bug. ***

Comment 13 IBM Bug Proxy 2018-04-17 06:52:11 UTC
Created attachment 1422920 [details]
tcg-runtime-gvec.i

Comment 15 Michael Petlan 2018-07-16 17:21:09 UTC
Reproduced successfully with gcc-4.8.5-28.el7_5.1 on both ppc64 and ppc64le; works OK with gcc-4.8.5-36.el7.

VERIFIED

Comment 17 errata-xmlrpc 2018-10-30 07:27:17 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-2018:3016