https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89405
David Malcolm <dmalcolm at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dmalcolm at gcc dot gnu.org --- Comment #3 from David Malcolm <dmalcolm at gcc dot gnu.org> --- -fno-weak: "This option exists only for testing, and should not be used by end-users" Failing assertion: 2957 /* Any code that creates entities with TREE_PUBLIC cleared should 2958 also set DECL_INTERFACE_KNOWN. */ 2959 gcc_assert (TREE_PUBLIC (decl)); on this decl: (gdb) call debug_tree (decl) <var_decl 0x7ffff1a657e0 value type <boolean_type 0x7ffff1a72888 bool readonly unsigned type_6 QI size <integer_cst 0x7ffff18adf18 constant 8> unit-size <integer_cst 0x7ffff18adf30 constant 1> align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x7ffff1a72888 precision:1 min <integer_cst 0x7ffff18cf180 0> max <integer_cst 0x7ffff18cf1b0 1>> readonly constant used static tree_1 tree_2 tree_3 unsigned nonlocal in_system_header read decl_1 QI ../x86_64-pc-linux-gnu/libstdc++-v3/include/type_traits:59:45 size <integer_cst 0x7ffff18adf18 8> unit-size <integer_cst 0x7ffff18adf30 1> align:8 warn_if_not_align:0 context <record_type 0x7ffff1a6ee70 integral_constant> initial <integer_cst 0x7ffff18cf180 0> template-info 0x7ffff1a69ba0 chain <function_decl 0x7ffff1a6d500 __conv_op >> (gdb) call inform (decl.decl_minimal.locus, "") In file included from ../x86_64-pc-linux-gnu/libstdc++-v3/include/bits/move.h:55, from ../x86_64-pc-linux-gnu/libstdc++-v3/include/bits/nested_exception.h:40, from ../../src/libstdc++-v3/libsupc++/exception:144, from ../../src/libstdc++-v3/libsupc++/new:40, from /tmp/test.cc:1: ../x86_64-pc-linux-gnu/libstdc++-v3/include/type_traits: At global scope: ../x86_64-pc-linux-gnu/libstdc++-v3/include/type_traits:59:45: note: 59 | static constexpr _Tp value = __v; | ^~~~~ within: /// integral_constant template<typename _Tp, _Tp __v> struct integral_constant { static constexpr _Tp value = __v; The flag gets cleared here in maybe_commonize_var in the "else" suite of an "if (flag_weak)": 5630 /* While for initialized variables, we must use internal 5631 linkage -- which means that multiple copies will not 5632 be merged. */ 5633 TREE_PUBLIC (decl) = 0; 5634 DECL_COMMON (decl) = 0;