https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119076
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> --- here is the full backtrace: In file included from ./include/nlohmann/json.hpp:60, of module ./json.hpp, imported at main.cxx:1: ./include/nlohmann/detail/output/serializer.hpp: In instantiation of ‘static uint8_t nlohmann::json_abi_v3_11_3::detail::serializer<BasicJsonType>::decode(uint8_t&, uint32_t&, uint8_t) [with BasicJsonType = nlohmann::json_abi_v3_11_3::basic_json<>; uint8_t = unsigned char; uint32_t = unsigned int]’: ./include/nlohmann/detail/output/serializer.hpp:405:27: required from ‘void nlohmann::json_abi_v3_11_3::detail::serializer<BasicJsonType>::dump_escaped(const string_t&, bool) [with BasicJsonType = nlohmann::json_abi_v3_11_3::basic_json<>; string_t = std::__cxx11::basic_string<char>]’ ./include/nlohmann/detail/output/serializer.hpp:140:25: required from ‘void nlohmann::json_abi_v3_11_3::detail::serializer<BasicJsonType>::dump(const BasicJsonType&, bool, bool, unsigned int, unsigned int) [with BasicJsonType = nlohmann::json_abi_v3_11_3::basic_json<>]’ ./include/nlohmann/json.hpp:4014:15: required from ‘std::ostream& nlohmann::json_abi_v3_11_3::operator<<(std::ostream&, const basic_json<>&)’ main.cxx:3:42: required from here 3 | int main() { std::cout << nlohmann::json{}; } | ^ ./include/nlohmann/detail/output/serializer.hpp:902:52: internal compiler error: Segmentation fault 0x288d94f internal_error(char const*, ...) /home/apinski/src/upstream-gcc-isel/gcc/gcc/diagnostic-global-context.cc:517 0x1411a0f crash_signal /home/apinski/src/upstream-gcc-isel/gcc/gcc/toplev.cc:322 0xdb0f9b braced_list_to_string /home/apinski/src/upstream-gcc-isel/gcc/gcc/c-family/c-common.cc:10144 0xdb1f3f braced_lists_to_strings /home/apinski/src/upstream-gcc-isel/gcc/gcc/c-family/c-common.cc:10363 0xda32f3 store_init_value(tree_node*, tree_node*, vec<tree_node*, va_gc, vl_embed>**, int) /home/apinski/src/upstream-gcc-isel/gcc/gcc/cp/typeck2.cc:863 0xb97630 check_initializer /home/apinski/src/upstream-gcc-isel/gcc/gcc/cp/decl.cc:8023 0xb9bd52 cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int, cp_decomp*) /home/apinski/src/upstream-gcc-isel/gcc/gcc/cp/decl.cc:9196 0xcf1552 tsubst_stmt /home/apinski/src/upstream-gcc-isel/gcc/gcc/cp/pt.cc:19033 0xcefc81 tsubst_stmt /home/apinski/src/upstream-gcc-isel/gcc/gcc/cp/pt.cc:18840 0xcefe1e tsubst_stmt /home/apinski/src/upstream-gcc-isel/gcc/gcc/cp/pt.cc:19205 0xd15646 tsubst_stmt /home/apinski/src/upstream-gcc-isel/gcc/gcc/cp/pt.cc:18826 0xd15646 instantiate_body /home/apinski/src/upstream-gcc-isel/gcc/gcc/cp/pt.cc:27670 0xced9fd instantiate_decl(tree_node*, bool, bool) /home/apinski/src/upstream-gcc-isel/gcc/gcc/cp/pt.cc:27954 0xd2694b instantiate_pending_templates(int) /home/apinski/src/upstream-gcc-isel/gcc/gcc/cp/pt.cc:28030 0xbaf1dd c_parse_final_cleanups() /home/apinski/src/upstream-gcc-isel/gcc/gcc/cp/decl2.cc:5541 0xe1e7b0 c_common_parse_file() /home/apinski/src/upstream-gcc-isel/gcc/gcc/c-family/c-opts.cc:1397 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions.