https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93862

--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
In build_static_cast_1:
 7397           tree lref = cp_build_reference_type (TREE_TYPE (type), false);
 7398           result = (perform_direct_initialization_if_possible
 7399                     (lref, expr, c_cast_p, complain));
 7400           result = build1 (NON_LVALUE_EXPR, type, result);
result is NULL_TREE so we create a bogus NON_LVALUE_EXPR<>.  Need to figure out
why perform_direct_initialization_if_possible returns a null tree.

clang++ trunk crashes on this code too.

Reply via email to