https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118796
--- Comment #9 from Lukas Mosimann <lumosimann at gmail dot com> --- Pretty sure they are related, just need to add one line back (line 7): https://godbolt.org/z/5dqG3bj7e to get the same error: internal compiler error: in copy_reference_ops_from_ref, at tree-ssa-sccvn.cc:1113 0x26727e5 diagnostic_context::diagnostic_impl(rich_location*, diagnostic_metadata const*, diagnostic_option_id, char const*, __va_list_tag (*) [1], diagnostic_t) ???:0 0x2689776 internal_error(char const*, ...) ???:0 0x9dedc2 fancy_abort(char const*, int, char const*) ???:0 0x13f2106 vn_reference_lookup(tree_node*, tree_node*, vn_lookup_kind, vn_reference_s**, bool, tree_node**, tree_node*, bool) ???:0 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.