https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112415
Bug ID: 112415 Summary: [14 regression] Python 3.11 miscompiled with new RTL fold mem offset pass, since r14-4664-g04c9cf5c786b94 Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: sjames at gcc dot gnu.org CC: danglin at gcc dot gnu.org, manolis.tsamis at vrull dot eu Target Milestone: --- I've bisected this twice and come to r14-4664-g04c9cf5c786b94 ('Implement new RTL optimizations pass: fold-mem-offsets'). -fno-fold-mem-offsets makes things work. Python 3.11.6 fails to build on HPPA since that commit with the built-Python segfaulting during the build. ``` hppa2.0-unknown-linux-gnu-gcc -c -Wsign-compare -DNDEBUG -O2 -pipe -march=2.0 -fdiagnostics-color=always -frecord-gcc-switches -ggdb3 -fwrapv -std=c11 -Wextra -Wno-unused-parameter -Wno-missing-field-init ializers -Wstrict-prototypes -Werror=implicit-function-declaration -fvisibility=hidden -I./Include/internal -I. -I./Include -I/usr/include/ncursesw -fPIC -DPy_BUILD_CORE -o Python/frozen.o Python/frozen.c ./_bootstrap_python ./Tools/scripts/deepfreeze.py \ Python/frozen_modules/importlib._bootstrap.h:importlib._bootstrap \ Python/frozen_modules/importlib._bootstrap_external.h:importlib._bootstrap_external \ Python/frozen_modules/zipimport.h:zipimport \ Python/frozen_modules/abc.h:abc \ Python/frozen_modules/codecs.h:codecs \ Python/frozen_modules/io.h:io \ Python/frozen_modules/_collections_abc.h:_collections_abc \ Python/frozen_modules/_sitebuiltins.h:_sitebuiltins \ Python/frozen_modules/genericpath.h:genericpath \ Python/frozen_modules/ntpath.h:ntpath \ Python/frozen_modules/posixpath.h:posixpath \ Python/frozen_modules/os.h:os \ Python/frozen_modules/site.h:site \ Python/frozen_modules/stat.h:stat \ Python/frozen_modules/importlib.util.h:importlib.util \ Python/frozen_modules/importlib.machinery.h:importlib.machinery \ Python/frozen_modules/runpy.h:runpy \ Python/frozen_modules/__hello__.h:__hello__ \ Python/frozen_modules/__phello__.h:__phello__ \ Python/frozen_modules/__phello__.ham.h:__phello__.ham \ Python/frozen_modules/__phello__.ham.eggs.h:__phello__.ham.eggs \ Python/frozen_modules/__phello__.spam.h:__phello__.spam \ Python/frozen_modules/frozen_only.h:frozen_only \ -o Python/deepfreeze/deepfreeze.c make: *** [Makefile:1298: Python/deepfreeze/deepfreeze.c] Segmentation fault (core dumped) make: *** Waiting for unfinished jobs.... hppa2.0-unknown-linux-gnu-gcc -c -I./Modules/_decimal/libmpdec -DCONFIG_32=1 -DANSI=1 -Wsign-compare -DNDEBUG -O2 -pipe -march=2.0 -fdiagnostics-color=always -frecord-gcc-switches -ggdb3 -fwrapv -std=c11 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -fvisibility=hidden -I./Include/internal -I. -I./Include -I/usr/include/ncursesw -fPIC -fPIC -o Modules/_decimal/libmpdec/mpdecimal.o ./Modules/_decimal/libmpdec/mpdecimal.c * ERROR: dev-lang/python-3.11.6::gentoo failed (compile phase): * emake failed ```