https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91023
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- The trunk we get the following ICE: <source>: In substitution of 'template<class ... T> std::optional<std::variant<_Types ...> > parse_variant(const Foo<T, std::variant<_Types ...> >& ...) [with T = <missing>]': <source>:34:34: required from here <source>:34:34: internal compiler error: tree check: expected class 'expression', have 'type' (record_type) in tree_operand_check, at tree.h:3939 34 | const auto x = parse_variant(a(), b()); | ~~~~~~~~~~~~~^~~~~~~~~~