[Bug c++/93862] [10 Regression] ICE on static_cast of rvalue-reference-to-array of unknown bound [P0338] to its known static bound

mpolacek at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Feb 21 00:28:00 GMT 2020


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.


More information about the Gcc-bugs mailing list