[PR c++/85027] deal with baselink in save_expr in instantiate_type
We use SAVE_EXPRs in conditional expressions without the middle
operand, to evaluate the first operand only once. When the conversion
of the first operand fails, we may call instantiate_type get a better
error message. We have code to peel off the SAVE_EXPR there, but then
we may end up with a BASELINK, and we're past the code that deals with
BASELINKs. Reorder the tests so that we expose the saved expr first,
and then deal with BASELINKs.
for gcc/cp/ChangeLog
PR c++/85027
* class.c (instantiate_type): Peel off SAVE_EXPR before
BASELINK.
for gcc/testsuite/ChangeLog
PR c++/85027
* g++.dg/pr85027.C: New.
From-SVN: r258989