https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122185
--- Comment #17 from Zdenek Sojka <zsojka at seznam dot cz> ---
So far I am still reducing the testcase.
It is crashing at a different place, with different flags:
$ x86_64-pc-linux-gnu-gcc
'-DGLOBAL_DATA_DIR=\"/usr/local/share/games/openttd\"'
'-DPERSONAL_DIR=\".openttd\"' -DPOINTER_IS_64BIT -DTTD_ENDIAN=TTD_LITTLE_ENDIAN
-DUNIX -DWITH_ASSERT -DWITH_CURL -DWITH_FLUIDSYNTH -DWITH_FONTCONFIG
-DWITH_FREETYPE -DWITH_HARFBUZZ -DWITH_ICU_I18N -DWITH_LIBLZMA -DWITH_LZO
-DWITH_OPENGL -DWITH_PERSONAL_DIR -DWITH_PNG -DWITH_SDL2 -DWITH_SSE -DWITH_ZLIB
-I/repo/gcc-test/openttd3/src
-I/repo/gcc-test/openttd3/src/3rdparty/squirrel/include -I/usr/include/harfbuzz
-I/repo/gcc-test/openttd3/build/generated
-I/repo/gcc-test/openttd3/build/generated/script/api
-I/repo/gcc-test/openttd3/src/script/api
-I/repo/gcc-test/openttd3/build/generated/script
-I/repo/gcc-test/openttd3/build/generated/script/api/ai
-I/repo/gcc-test/openttd3/src/script/api/ai
-I/repo/gcc-test/openttd3/build/generated/script/api/game
-I/repo/gcc-test/openttd3/src/script/api/game
-I/repo/gcc-test/openttd3/build/generated/script/api/template
-I/repo/gcc-test/openttd3/src/script/api/template -isystem /usr/include/SDL2
-isystem /usr/include/freetype2 -fno-thread-jumps -O -fprofile-use -std=gnu++20
signature3.cpp -w
signature3.cpp: In member function 'ValueType
nlohmann::json_abi_v3_11_3::basic_json<ObjectType, ArrayType, StringType,
BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType,
AllocatorType, JSONSerializer, BinaryType,
CustomBaseClass>::get_impl(nlohmann::json_abi_v3_11_3::detail::priority_tag<0>)
const [with ValueType = std::__cxx11::basic_string<char>; typename
std::enable_if<(nlohmann::json_abi_v3_11_3::detail::is_default_constructible<ValueType>::value
&&
nlohmann::json_abi_v3_11_3::detail::has_from_json<nlohmann::json_abi_v3_11_3::basic_json<ObjectType,
ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType,
NumberFloatType, AllocatorType, JSONSerializer, BinaryType, CustomBaseClass>,
ValueType>::value), int>::type <anonymous> = 0; ObjectType = std::map;
ArrayType = std::vector; StringType = std::__cxx11::basic_string<char>;
BooleanType = bool; NumberIntegerType = long int; NumberUnsignedType = long
unsigned int; NumberFloatType = double; AllocatorType = std::allocator;
JSONSerializer = nlohmann::json_abi_v3_11_3::adl_serializer; BinaryType =
std::vector<unsigned char>; CustomBaseClass = void]':
signature3.cpp:16509:15: error: invalid conversion in return statement
16509 | JSONSerializer<ValueType>::from_json(std::declval<const
basic_json_t&>(), std::declval<ValueType&>())))
| ^ ~~~~~~
struct basic_string
const struct string_t *
# VUSE <.MEM_7>
return _16;
during GIMPLE pass: dom
signature3.cpp:16509:15: internal compiler error: verify_gimple failed
0x2ef53ac internal_error(char const*, ...)
/repo/gcc-trunk/gcc/diagnostic-global-context.cc:786
0x19781bd verify_gimple_in_cfg(function*, bool, bool)
/repo/gcc-trunk/gcc/tree-cfg.cc:5603
0x17d434a execute_function_todo
/repo/gcc-trunk/gcc/passes.cc:2097
0x17d481e execute_todo
/repo/gcc-trunk/gcc/passes.cc:2149
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.