https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111898
Bug ID: 111898 Summary: [SH] [12 13 Regression] internal compiler error: Segmentation fault when building PostgreSQL 16 Product: gcc Version: 13.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: glaubitz at physik dot fu-berlin.de CC: olegendo at gcc dot gnu.org, ysato at users dot sourceforge.jp Target Milestone: --- Target: sh-*-*-* Created attachment 56158 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56158&action=edit Preprocessed source from building PostgreSQL 16 with gcc-13 Trying to build PostgreSQL 16 on Debian unstable sh4 with gcc-12 or gcc-13 results in the compiler crashing with a segmentation fault: root@tirpitz:..backend/access> /usr/bin/sh4-linux-gnu-gcc-12 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wshadow=compatible-local -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -g -g -O2 -ffile-prefix-map=/build/postgresql-16-T1yJxb/postgresql-16-16.0/=. -specs=/usr/share/dpkg/pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -I../../../../src/include -I/build/postgresql-16-T1yJxb/postgresql-16-16.0/build/src/include -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2 -c -o heapam.o /build/postgresql-16-T1yJxb/postgresql-16-16.0/build/../src/backend/access/heap/heapam.c -save-temps sh4-linux-gnu-gcc-12: internal compiler error: Segmentation fault signal terminated program cc1 Please submit a full bug report, with preprocessed source (by using -freport-bug). See <file:///usr/share/doc/gcc-12/README.Bugs> for instructions. root@tirpitz:..backend/access> /usr/bin/sh4-linux-gnu-gcc-13 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wshadow=compatible-local -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -g -g -O2 -ffile-prefix-map=/build/postgresql-16-T1yJxb/postgresql-16-16.0/=. -specs=/usr/share/dpkg/pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -I../../../../src/include -I/build/postgresql-16-T1yJxb/postgresql-16-16.0/build/src/include -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2 -c -o heapam.o /build/postgresql-16-T1yJxb/postgresql-16-16.0/build/../src/backend/access/heap/heapam.c -save-temps sh4-linux-gnu-gcc-13: internal compiler error: Segmentation fault signal terminated program cc1 Please submit a full bug report, with preprocessed source (by using -freport-bug). See <file:///usr/share/doc/gcc-13/README.Bugs> for instructions. root@tirpitz:..backend/access> Both gcc-10 and gcc-11 work fine: root@tirpitz:..backend/access> /usr/bin/sh4-linux-gnu-gcc-10 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wshadow=compatible-local -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -g -g -O2 -ffile-prefix-map=/build/postgresql-16-T1yJxb/postgresql-16-16.0/=. -specs=/usr/share/dpkg/pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -I../../../../src/include -I/build/postgresql-16-T1yJxb/postgresql-16-16.0/build/src/include -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2 -c -o heapam.o /build/postgresql-16-T1yJxb/postgresql-16-16.0/build/../src/backend/access/heap/heapam.c -save-temps root@tirpitz:..backend/access> /usr/bin/sh4-linux-gnu-gcc-11 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wshadow=compatible-local -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -g -g -O2 -ffile-prefix-map=/build/postgresql-16-T1yJxb/postgresql-16-16.0/=. -specs=/usr/share/dpkg/pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -I../../../../src/include -I/build/postgresql-16-T1yJxb/postgresql-16-16.0/build/src/include -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2 -c -o heapam.o /build/postgresql-16-T1yJxb/postgresql-16-16.0/build/../src/backend/access/heap/heapam.c -save-temps root@tirpitz:..backend/access> Attaching the preprocessed source generated with "-save-temps".