c++: ICE with ptr_plus_expr
authorNathan Sidwell <nathan@acm.org>
Tue, 21 Apr 2020 13:46:42 +0000 (06:46 -0700)
committerNathan Sidwell <nathan@acm.org>
Tue, 21 Apr 2020 13:50:36 +0000 (06:50 -0700)
commitf2c8be187e8eb061e44166ac41646285821be6a6
treec8baa0d930c4da9f136719fcb48c3445539bf09f
parent15256c8a8ac6573d250506c40dbe13082186c2aa
c++: ICE with ptr_plus_expr

An ICE on darwin, when a SFINAE-context substitution produced
error_mark_node foo an operand of a POINTER_PLUS_EXPR.
fold_build_pointer_plus is unprepared to deal with that, so we need to
check earlier.  We had no luck reducing the testcase to something
manageable.

* pt.c (tsubst_copy_and_build) [POINTER_PLUS_EXPR]: Check for
error_mark_node.
gcc/cp/ChangeLog
gcc/cp/pt.c