Newest sys-devel/gcc-14_pre fails to compile for me (lto) with: /var/tmp/notmpfs/portage/sys-devel/gcc-14.0.0_pre20231217/work/gcc-14-20231217/libiberty/regex.c: In function ‘byte_re_match_2_internal’: /var/tmp/notmpfs/portage/sys-devel/gcc-14.0.0_pre20231217/work/gcc-14-20231217/libiberty/regex.c:5549:1: warning: stack protector not protecting local variables: variable length buffer [-Wstack-protector] 5549 | byte_re_match_2_internal (struct re_pattern_buffer *bufp, | ^ /var/tmp/notmpfs/portage/sys-devel/gcc-14.0.0_pre20231217/work/gcc-14-20231217/gcc/graphds.h:35:8: error: type ‘struct vertex’ violates the C++ One Definition Rule [-Werror=odr] 35 | struct vertex | ^ /var/tmp/notmpfs/portage/sys-devel/gcc-14.0.0_pre20231217/work/gcc-14-20231217/gcc/gimple-ssa-sccopy.cc:119: note: a different type is defined in another translation unit 119 | struct vertex /var/tmp/notmpfs/portage/sys-devel/gcc-14.0.0_pre20231217/work/gcc-14-20231217/gcc/graphds.h:37:22: note: the first difference of corresponding definitions is field ‘pred’ 37 | struct graph_edge *pred, *succ; | ^ /var/tmp/notmpfs/portage/sys-devel/gcc-14.0.0_pre20231217/work/gcc-14-20231217/gcc/gimple-ssa-sccopy.cc:121: note: a field with different name is defined in another translation unit 121 | bool active; /* scc_discovery::compute_sccs () only considers a subgraph of /var/tmp/notmpfs/portage/sys-devel/gcc-14.0.0_pre20231217/work/gcc-14-20231217/libiberty/cp-demangle.c: In function ‘cplus_demangle_v3’: /var/tmp/notmpfs/portage/sys-devel/gcc-14.0.0_pre20231217/work/gcc-14-20231217/libiberty/cp-demangle.c:7046:1: warning: stack protector not protecting local variables: variable length buffer [-Wstack-protector] 7046 | cplus_demangle_v3 (const char *mangled, int options) ... /var/tmp/notmpfs/portage/sys-devel/gcc-14.0.0_pre20231217/work/build/./prev-gcc/xg++ -B/var/tmp/notmpfs/portage/sys-devel/gcc-14.0.0_pre20231217/work/build/./prev-gcc/ -B/usr/x86_64-pc-linux-gnu/bin/ -nostdinc++ -B/var/tmp/notmpfs/portage/sys-devel/gcc-14.0.0_pre20231217/work/build/prev-x86_64-pc-linux-gnu/libstdc++-v3/src/.libs -B/var/tmp/notmpfs/portage/sys-devel/gcc-14.0.0_pre20231217/work/build/prev-x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs -I/var/tmp/notmpfs/portage/sys-devel/gcc-14.0.0_pre20231217/work/build/prev-x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu -I/var/tmp/notmpfs/portage/sys-devel/gcc-14.0.0_pre20231217/work/build/prev-x86_64-pc-linux-gnu/libstdc++-v3/include -I/var/tmp/notmpfs/portage/sys-devel/gcc-14.0.0_pre20231217/work/gcc-14-20231217/libstdc++-v3/libsupc++ -L/var/tmp/notmpfs/portage/sys-devel/gcc-14.0.0_pre20231217/work/build/prev-x86_64-pc-linux-gnu/libstdc++-v3/src/.libs -L/var/tmp/notmpfs/portage/sys-devel/gcc-14.0.0_pre20231217/work/build/prev-x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs -pie -Wl,-z,now -DDEF_GENTOO_SCP -DDEF_GENTOO_ZNOW -DEXTRA_OPTIONS -DGENTOO_FORTIFY_SOURCE_LEVEL=3 -DDEF_GENTOO_GLIBCXX_ASSERTIONS -m64 -pipe -march=native -Werror=strict-aliasing -Werror=odr -Werror=lto-type-mismatch -Wstack-protector -O2 -fno-harden-control-flow-redundancy -fno-checking -flto=jobserver -frandom-seed=1 -fprofile-generate -flto=jobserver -frandom-seed=1 -DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Wconditionally-supported -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common -DHAVE_CONFIG_H -pie -Wl,-z,now -static-libstdc++ -static-libgcc -Wl,-m -Wl,elf_x86_64 -fuse-ld=mold -Wl,--as-needed -Wl,-O2 -Wl,-z,pack-relative-relocs -Wl,--defsym=__gentoo_check_ldflags__=0 -o lto-dump \ lto/lto-lang.o lto/lto-object.o attribs.o lto/lto-partition.o lto/lto-symtab.o lto/lto-dump.o lto/lto-common.o libbackend.a main.o libcommon-target.a libcommon.a ../libcpp/libcpp.a ../libdecnumber/libdecnumber.a -lisl -lmpc -lmpfr -lgmp -rdynamic -lz -Lyes/lib -lzstd libcommon.a ../libcpp/libcpp.a ../libbacktrace/.libs/libbacktrace.a ../libiberty/pic/libiberty.a ../libdecnumber/libdecnumber.a /var/tmp/notmpfs/portage/sys-devel/gcc-14.0.0_pre20231217/work/gcc-14-20231217/gcc/graphds.h:35:8: error: type ‘struct vertex’ violates the C++ One Definition Rule [-Werror=odr] 35 | struct vertex | ^ /var/tmp/notmpfs/portage/sys-devel/gcc-14.0.0_pre20231217/work/gcc-14-20231217/gcc/gimple-ssa-sccopy.cc:119: note: a different type is defined in another translation unit 119 | struct vertex /var/tmp/notmpfs/portage/sys-devel/gcc-14.0.0_pre20231217/work/gcc-14-20231217/gcc/graphds.h:37:22: note: the first difference of corresponding definitions is field ‘pred’ 37 | struct graph_edge *pred, *succ; | ^ /var/tmp/notmpfs/portage/sys-devel/gcc-14.0.0_pre20231217/work/gcc-14-20231217/gcc/gimple-ssa-sccopy.cc:121: note: a field with different name is defined in another translation unit 121 | bool active; /* scc_discovery::compute_sccs () only considers a subgraph of lto1: some warnings being treated as errors lto-wrapper: fatal error: /var/tmp/notmpfs/portage/sys-devel/gcc-14.0.0_pre20231217/work/build/./prev-gcc/xg++ returned 1 exit status compilation terminated. Reproducible: Always ns ~ # emerge --info Portage 3.0.57 (python 3.11.6-final-0, default/linux/amd64/17.1/no-multilib/hardened, gcc-14, glibc-2.37-r7, 6.1.67-gentoo-x86_64 x86_64) ================================================================= System uname: Linux-6.1.67-gentoo-x86_64-x86_64-12th_Gen_Intel-R-_Core-TM-_i7-1270P-with-glibc2.37 KiB Mem: 6084168 total, 3672984 free KiB Swap: 6291452 total, 5817340 free Timestamp of repository guru: Mon, 18 Dec 2023 17:31:56 +0000 Head commit of repository guru: 880ae23adccaa79f99afc5e189a45534944a5b1a Timestamp of repository gentoo: Tue, 19 Dec 2023 00:30:01 +0000 Head commit of repository gentoo: 9121b64f24cf600b88a28d83bf3d0f09b69a5f5f sh bash 5.1_p16-r6 ld GNU ld (Gentoo 2.41 p2) 2.41.0 app-misc/pax-utils: 1.3.5::gentoo app-shells/bash: 5.1_p16-r6::gentoo dev-lang/perl: 5.38.2-r1::gentoo dev-lang/python: 3.11.6::gentoo, 3.12.1::gentoo dev-util/cmake: 3.27.7::gentoo dev-util/meson: 1.2.3::gentoo sys-apps/baselayout: 2.14-r1::gentoo sys-apps/openrc: 0.48::gentoo sys-apps/sandbox: 2.38::gentoo sys-devel/autoconf: 2.71-r6::gentoo sys-devel/automake: 1.16.5-r1::gentoo sys-devel/binutils: 2.41-r2::gentoo sys-devel/binutils-config: 5.5::gentoo sys-devel/gcc: 13.2.1_p20230826::gentoo, 14.0.0_pre20231210::gentoo sys-devel/gcc-config: 2.11::gentoo sys-devel/libtool: 2.4.7-r1::gentoo sys-devel/make: 4.4.1-r1::gentoo sys-kernel/linux-headers: 6.1::gentoo (virtual/os-headers) sys-libs/glibc: 2.37-r7::gentoo Repositories: local location: /var/db/repos/local masters: gentoo priority: -1 volatile: False guru location: /var/db/repos/guru sync-type: git sync-uri: https://github.com/gentoo-mirror/guru.git masters: gentoo volatile: False gentoo location: /var/db/repos/gentoo sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: 1 volatile: False sync-rsync-verify-metamanifest: no sync-rsync-extra-opts: sync-rsync-verify-max-age: 3 sync-rsync-verify-jobs: 1 ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="@FREE" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe -march=native -Werror=strict-aliasing -Werror=odr -Werror=lto-type-mismatch -Wstack-protector -fgraphite-identity -floop-interchange -ftree-loop-distribution -floop-strip-mine -floop-block -flto=2 -fuse-linker-plugin -fno-fat-lto-objects -ftree-vectorize" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/bind /var/spool/munin-async/.ssh" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-O2 -pipe -march=native -Werror=strict-aliasing -Werror=odr -Werror=lto-type-mismatch -Wstack-protector -fgraphite-identity -floop-interchange -ftree-loop-distribution -floop-strip-mine -floop-block -flto=2 -fuse-linker-plugin -fno-fat-lto-objects -ftree-vectorize -flifetime-dse=1" DISTDIR="/var/cache/distfiles" EMERGE_DEFAULT_OPTS=" --buildpkg-exclude 'virtual/* sys-kernel/*-sources sys-apps/pkgcore'" ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME" FCFLAGS="-O2 -pipe -march=native -Werror=strict-aliasing -Werror=odr -Werror=lto-type-mismatch -Wstack-protector -fgraphite-identity -floop-interchange -ftree-loop-distribution -floop-strip-mine -floop-block -flto=2 -fuse-linker-plugin -fno-fat-lto-objects -ftree-vectorize" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe -march=native -Werror=strict-aliasing -Werror=odr -Werror=lto-type-mismatch -Wstack-protector -fgraphite-identity -floop-interchange -ftree-loop-distribution -floop-strip-mine -floop-block -flto=2 -fuse-linker-plugin -fno-fat-lto-objects -ftree-vectorize" GENTOO_MIRRORS="http://gentoo.mirrors.ovh.net/gentoo-distfiles/ https://ftp.uni-hannover.de/gentoo/ https://ftp.agdsn.de/gentoo" LANG="en_US.utf8" LDFLAGS="-fuse-ld=mold -Wl,--as-needed -Wl,-O2 -flto -fuse-linker-plugin -Wl,-z,pack-relative-relocs -Wl,--defsym=__gentoo_check_ldflags__=0" LEX="flex" LINGUAS="en" MAKEOPTS="-j2" PKGDIR="/var/cache/binpkgs" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git" PORTAGE_TMPDIR="/var/tmp" SHELL="/bin/bash" USE="acl amd64 audit berkdb bzip2 caps cli crypt dri fortran hardened iconv idn ipv6 libtirpc lto ncurses nls nptl openmp pam pcre pgo pic pie readline seccomp split-usr ssl ssp syslog test-rust udev unicode usb verify-sig xattr xml xtpax zlib zstd" ABI_X86="64" CPU_FLAGS_X86="mmx mmxext sse sse2 aes avx avx2 f16c fma3 pclmul popcnt rdrand sha sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GRUB_PLATFORMS="pc" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en-US" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" PYTHON_SINGLE_TARGET="python3_11" PYTHON_TARGETS="python3_11" RUBY_TARGETS="ruby31" Unset: ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS sys-devel/mold-2.4.0
Created attachment 880011 [details] build.log
Yep, I hit the same and reported it upstream when I noticed it. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113054.
https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=4554a151d0ec62332c332175ec1017f853006b60
commit 6605c577dd40fbfed0126e3f1bd80fb124b31aef Author: Sam James <sam@gentoo.org> Date: Mon Dec 25 06:41:20 2023 +0000 sys-devel/gcc: 🎄🎅🎁 add 14.0.0_pre20231224 🎄🎅🎁 Signed-off-by: Sam James <sam@gentoo.org>