https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103309
Bug ID: 103309 Summary: [12 Regression] Random gcc/system.h:784:34: error: section type conflict Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: bootstrap Assignee: unassigned at gcc dot gnu.org Reporter: hjl.tools at gmail dot com Target Milestone: --- On Linux/x86-64, I started getting: /export/build/gnu/tools-build/gcc-gitlab/build-x86_64-linux/./prev-gcc/xg++ -B/export/build/gnu/tools-build/gcc-gitlab/build-x86_64-linux/./prev-gcc/ -B/usr/gcc-12.0.0-x86-64/x86_64-pc-linux-gnu/bin/ -nostdinc++ -B/export/build/gnu/tools-build/gcc-gitlab/build-x86_64-linux/prev-x86_64-pc-linux-gnu/libstdc++-v3/src/.libs -B/export/build/gnu/tools-build/gcc-gitlab/build-x86_64-linux/prev-x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs -I/export/build/gnu/tools-build/gcc-gitlab/build-x86_64-linux/prev-x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu -I/export/build/gnu/tools-build/gcc-gitlab/build-x86_64-linux/prev-x86_64-pc-linux-gnu/libstdc++-v3/include -I/export/gnu/import/git/gitlab/x86-gcc/libstdc++-v3/libsupc++ -L/export/build/gnu/tools-build/gcc-gitlab/build-x86_64-linux/prev-x86_64-pc-linux-gnu/libstdc++-v3/src/.libs -L/export/build/gnu/tools-build/gcc-gitlab/build-x86_64-linux/prev-x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs -fno-PIE -c -g -O2 -fchecking=1 -DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-error=format-diag -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror -fno-common -DHAVE_CONFIG_H -I. -I. -I/export/gnu/import/git/gitlab/x86-gcc/gcc -I/export/gnu/import/git/gitlab/x86-gcc/gcc/. -I/export/gnu/import/git/gitlab/x86-gcc/gcc/../include -I/export/gnu/import/git/gitlab/x86-gcc/gcc/../libcpp/include -I/export/gnu/import/git/gitlab/x86-gcc/gcc/../libcody -I/export/gnu/import/git/gitlab/x86-gcc/gcc/../libdecnumber -I/export/gnu/import/git/gitlab/x86-gcc/gcc/../libdecnumber/bid -I../libdecnumber -I/export/gnu/import/git/gitlab/x86-gcc/gcc/../libbacktrace -o passes.o -MT passes.o -MMD -MP -MF ./.deps/passes.TPo /export/gnu/import/git/gitlab/x86-gcc/gcc/passes.c In file included from /export/gnu/import/git/gitlab/x86-gcc/gcc/passes.c:26: In member function ??hash_table<Descriptor, Lazy, Allocator>::value_type* hash_table<Descriptor, Lazy, Allocator>::alloc_entries(size_t) const [with Descriptor = hash_map<nofree_string_hash, opt_pass*>::hash_entry; bool Lazy = false; Allocator = xcallocator]??, inlined from ??void hash_table<Descriptor, Lazy, Allocator>::expand() [with Descriptor = hash_map<nofree_string_hash, opt_pass*>::hash_entry; bool Lazy = false; Allocator = xcallocator]?? at /export/gnu/import/git/gitlab/x86-gcc/gcc/hash-table.h:802:40: /export/gnu/import/git/gitlab/x86-gcc/gcc/system.h:784:34: error: section type conflict with ??void hash_table<Descriptor, Lazy, Allocator>::expand() [with Descriptor = hash_map<nofree_string_hash, opt_pass*>::hash_entry; bool Lazy = false; Allocator = xcallocator]?? 784 | ((void)(!(EXPR) ? fancy_abort (__FILE__, __LINE__, __FUNCTION__), 0 : 0)) | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /export/gnu/import/git/gitlab/x86-gcc/gcc/hash-table.h:715:3: note: in expansion of macro ??gcc_assert?? 715 | gcc_assert (nentries != NULL); | ^~~~~~~~~~ In file included from /export/gnu/import/git/gitlab/x86-gcc/gcc/coretypes.h:482, from /export/gnu/import/git/gitlab/x86-gcc/gcc/passes.c:27: /export/gnu/import/git/gitlab/x86-gcc/gcc/hash-table.h: In member function ??void hash_table<Descriptor, Lazy, Allocator>::expand() [with Descriptor = hash_map<nofree_string_hash, opt_pass*>::hash_entry; bool Lazy = false; Allocator = xcallocator]??: /export/gnu/import/git/gitlab/x86-gcc/gcc/hash-table.h:779:1: note: ??void hash_table<Descriptor, Lazy, Allocator>::expand() [with Descriptor = hash_map<nofree_string_hash, opt_pass*>::hash_entry; bool Lazy = false; Allocator = xcallocator]?? was declared here 779 | hash_table<Descriptor, Lazy, Allocator>::expand () | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /export/gnu/import/git/gitlab/x86-gcc/gcc/coretypes.h:474, from /export/gnu/import/git/gitlab/x86-gcc/gcc/expmed.c:26: In function ??poly_uint16 mode_to_bytes(machine_mode)??, inlined from ??typename if_nonpoly<typename T::measurement_type>::type GET_MODE_SIZE(const T&) [with T = scalar_int_mode]?? at /export/gnu/import/git/gitlab/x86-gcc/gcc/machmode.h:647:24, inlined from ??rtx_def* emit_store_flag_1(rtx, rtx_code, rtx, rtx, machine_mode, int, int, machine_mode)?? at /export/gnu/import/git/gitlab/x86-gcc/gcc/expmed.c:5724:56: /export/gnu/import/git/gitlab/x86-gcc/gcc/machmode.h:550:49: warning: ??*(unsigned int*)((char*)&int_mode + offsetof(scalar_int_mode, scalar_int_mode::m_mode))?? may be used uninitialized in this function [-Wmaybe-uninitialized] 550 | ? mode_size_inline (mode) : mode_size[mode]); | ^~~~ /export/gnu/import/git/gitlab/x86-gcc/gcc/expmed.c: In function ??rtx_def* emit_store_flag_1(rtx, rtx_code, rtx, rtx, machine_mode, int, int, machine_mode)??: /export/gnu/import/git/gitlab/x86-gcc/gcc/expmed.c:5653:19: note: ??*(unsigned int*)((char*)&int_mode + offsetof(scalar_int_mode, scalar_int_mode::m_mode))?? was declared here 5653 | scalar_int_mode int_mode; | ^~~~~~~~ make[5]: *** [Makefile:1138: passes.o] Error 1 It happened at random and is not reproducible by hand.