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.
Can you provide the attachment?
Created attachment 1398070 [details] preprocessed source causing error.
Sorry, not sure why wasn't attachment added (added in form for new bug).
I'll see if I can bisect it but I'm afraid it's too late for 7.5.
Fixed by http://gcc.gnu.org/r227444. Seems backportable.
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.
*** Bug 1565536 has been marked as a duplicate of this bug. ***
Created attachment 1422920 [details] tcg-runtime-gvec.i
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
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