Bug 2048910 - internal compiler error when building mame on ppc64le with precompiled headers enabled
Summary: internal compiler error when building mame on ppc64le with precompiled header...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: rawhide
Hardware: ppc64le
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1541613 1649936
Blocks: PPCTracker
TreeView+ depends on / blocked
 
Reported: 2022-02-01 07:24 UTC by Julian Sikorski
Modified: 2022-02-04 08:02 UTC (History)
13 users (show)

Fixed In Version: gcc-12.0.1-0.5.fc36
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1541613
Environment:
Last Closed: 2022-02-04 08:02:58 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
GNU Compiler Collection 104323 0 P3 ASSIGNED [12 Regression] PCH (and maybe GC) of rs6000 builtins broken 2022-02-01 13:07:25 UTC

Description Julian Sikorski 2022-02-01 07:24:27 UTC
Description of problem:
mame-0.240 fails to build on ppc64le when precompiled headers are enabled.

Version-Release number of selected component (if applicable):
0.240-1.fc36

How reproducible:
always

Steps to Reproduce:
1. fedpkg clone mame
2. cd mame
3. remove or comment out lines 227 to 231 in the spec file
4. attempt a build

Actual results:
build fails with the following error:

*** WARNING *** there are active plugins, do not report this as a bug unless you can reproduce it without enabling any plugins.
Event                            | Plugins
PLUGIN_FINISH_UNIT               | annobin: Generate final annotations
PLUGIN_START_UNIT                | annobin: Generate global annotations
PLUGIN_ALL_PASSES_START          | annobin: Generate per-function annotations
PLUGIN_ALL_PASSES_END            | annobin: Register per-function end symbols
In file included from ../../../../../src/emu/video/rgbutil.h:24,
                 from ../../../../../src/mame/drivers/rollext.cpp:123:
../../../../../src/emu/video/rgbvmx.h: In member function 'void rgbaint_t::set(u32)':
../../../../../src/emu/video/rgbvmx.h:49:62: internal compiler error: Segmentation fault
   49 |                 m_value = VECS32(vec_mergeh(VECS16(vec_mergeh(temp, VECS8(zero))), VECS16(zero)));
      |                                                              ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
make[2]: *** [gaelco.make:586: ../../../../linux_gcc/obj/x64/Release/src/mame/drivers/rollext.o] Error 1

Full log: https://kojipkgs.fedoraproject.org//work/tasks/19/82140019/build.log

with annobin disabled the error is there as well:

In file included from ../../../../../src/emu/video/rgbutil.h:24,
                 from ../../../../../src/emu/rendersw.hxx:14,
                 from ../../../../../src/emu/video.cpp:16:
../../../../../src/emu/video/rgbvmx.h: In member function 'void rgbaint_t::set(u32)':
../../../../../src/emu/video/rgbvmx.h:49:62: internal compiler error: in fold_convert_loc, at fold-const.cc:2450
   49 |                 m_value = VECS32(vec_mergeh(VECS16(vec_mergeh(temp, VECS8(zero))), VECS16(zero)));
      |                                                              ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
                                                                             ~~~~~~^~~~~
make[2]: *** [casio.make:362: ../../../../linux_gcc/obj/x64/Release/src/mame/drivers/fp200.o] Error 1
make[1]: *** [Makefile:463: casio] Error 2

Expected results:
Build completes successfully. As per comment from Jakub Jelinek on bug #1541613:

Seems to be PCH related, looks like rs6000_builtin_info[?].fntype contains random garbage.
When PCH is disabled, compiles just fine.
Will try to reproduce tomorrow on a simpler testcase.

I tried to get preprocessed source with -save-temps, but with header precompilation enabled, the build fails with gcc complaining about the PCH being created and used with different settings of %<-fpic%>.

Comment 1 Jakub Jelinek 2022-02-04 08:02:58 UTC
Should be fixed now.


Note You need to log in before you can comment on or make changes to this bug.