Bug 1489712

Summary: internal compiler error: in rs6000_secondary_reload_fail, at config/rs6000/rs6000.c:16984
Product: Red Hat Enterprise Linux 7 Reporter: Mihai Moldovan <ionic>
Component: gccAssignee: Marek Polacek <mpolacek>
Status: CLOSED WONTFIX QA Contact: Michael Petlan <mpetlan>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.4CC: jakub, ohudlick, orion
Target Milestone: rc   
Target Release: ---   
Hardware: ppc64le   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-11-28 16:15:50 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:
Attachments:
Description Flags
Preprocessed source to test with. none

Description Mihai Moldovan 2017-09-08 08:02:56 UTC
Created attachment 1323593 [details]
Preprocessed source to test with.

[Copy of the CentOS bug report, since the GCC packages have been taken unchanged from the RHEL 7.3 repository.]

A similar issue has been reported and fixed earlier as part of https://bugzilla.redhat.com/show_bug.cgi?id=1063999 but surfaced on ppc64 (BE).

Building nx-libs on ppc64le.

Failure:

gcc -m64 -c -O2 -fno-strict-aliasing -mminimal-toc -I../../../../../extras/Mesa/src/mesa -I../../../../../extras/Mesa/src/mesa/main -I../../../../../extras/Mesa/src/mesa/glapi -I../../../.
./../extras/Mesa/src/mesa/swrast -I../../../../../extras/Mesa/src/mesa/swrast_setup -I../../../../../extras/Mesa/src/mesa/shader -I../../../../../extras/Mesa/include -I../../../
../../programs/Xserver/include -I../../../../../exports/include/X11 -I../../../../../programs/Xserver/GL/include -I../../../../../programs/Xserver/GL/glx -I../../../../../lib/GL/include
      -I../../../../../programs/Xserver/hw/xfree86 -I../../../../../exports/include -I../../../../.. -I../../../../../exports/include -Dlinux -D__powerpc64__ -D__powerpc__ -D_POSIX_C_SOURCE=199309L
-D_POSIX_SOURCE -D_XOPEN_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
                 -DSHAPE -DXINPUT -DXKB -DXAPPGROUP -DXCSECURITY -DTOGCUP -DXF86BIGFONT -DDPMSExtension -DPANORAMIX -DRENDER -DRANDR -DXFIXES -DDAMAGE -DCOMPOSITE -DXEVIE -DGCCUSESGAS -DAVOID_GLYPHBLT -DPIX
PRIV -DSINGLEDEPTH -DXFreeXDGA -DXvExtension -DXFree86Server -DXF86VIDMODE -DXvMCExtension
        -DSMART_SCHEDULE -DBUILDDEBUG -DXResExtension -DX_BYTE_ORDER=X_BIG_ENDIAN -DXORG_VERSION_CURRENT="(((6) * 10000000) + ((9) * 100000) +
 ((0) * 1000) + 0)" -D_XSERVER64 -DNDEBUG -DFUNCPROTO=15 -DNARROWPROTO -DGLXEXT -DGLX_USE_MESA s_aatriangle.c
rs6000_secondary_reload_inner:17193, type = load
(parallel [
        (set (reg:SF 33 1)
            (mem/u/c:SF (unspec:DI [
                        (symbol_ref/u:DI ("*.LC15") [flags 0x2])
                        (reg:DI 30 30)
                    ] UNSPEC_TOCREL) [0 S4 A32]))
        (clobber (reg:DI 9 9))
    ])
s_aatriangle.c: In function 'spec_tex_aa_tri':
s_aatriangle.c:429:1: internal compiler error: in rs6000_secondary_reload_fail, at config/rs6000/rs6000.c:16984


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57936 could be related, although that surfaced on ppc64.

In any case, the patch seems not to have been backported to either 4.8.3-9 or 4.8.5-11. Could be worth a stab, but no idea if that's actually fixing the problem.


Preprocessed source file attached.

Comment 5 Mihai Moldovan 2017-10-14 03:02:24 UTC
Changing target, since also reproducible on CentOS 7.4.1708.

Comment 6 Orion Poplawski 2017-11-10 00:26:25 UTC
I think I may be hitting this as well with nx-libs:

rs6000_secondary_reload_inner:17241, type = load
(parallel [
        (set (reg:SF 33 1)
            (mem/u/c:SF (unspec:DI [
                        (symbol_ref/u:DI ("*.LC17") [flags 0x2])
                        (reg:DI 30 30)
                    ] UNSPEC_TOCREL) [1  S4 A32]))
        (clobber (reg:DI 3 3))
    ])
s_aatriangle.c: In function 'spec_tex_aa_tri':
s_aatriangle.c:429:1: internal compiler error: in rs6000_secondary_reload_fail, at config/rs6000/rs6000.c:17032
 }
 ^

https://koji.fedoraproject.org/koji/taskinfo?taskID=23024133

Comment 7 Mihai Moldovan 2017-11-10 11:29:05 UTC
Hardly surprising, since I experienced this while building... nx-libs. :)

Orion, in case you're preparing packages following the 3.5.0.33 release from a few days ago, you can work around the issue by adding -mno-vsx to the C(XX)FLAGS like in https://code.x2go.org/gitweb?p=nx-libs.git;a=blob;f=nx-libs.spec;h=df2d5a52d66677d1efc4c5c710e557448593e68c;hb=HEAD#l3

Make sure to also adapt the building process, since we're now passing compiler flags down correctly, see: https://code.x2go.org/gitweb?p=nx-libs.git;a=blob;f=nx-libs.spec;h=df2d5a52d66677d1efc4c5c710e557448593e68c;hb=HEAD#l764 (especially important if you apply hardening flags - these were mostly ignored before.)

Previous versions won't correctly pass down compiler flags.

Comment 8 Marek Polacek 2017-11-28 16:15:50 UTC
Unfortunately, a backportable fix isn't available at this moment.  A workaround is to either use -mno-vsx or -mminimal-toc for the TU in question.  I don't think we will have a fix for 7.6, so I'm closing this, sorry.