https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98990
Jason Merrill <jason at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |NEW Assignee|jason at gcc dot gnu.org |unassigned at gcc dot gnu.org --- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> --- (In reply to Martin Liška from comment #2) > With -fchecking, it started with a6ee556c7659877b. i.e. r10-6571 The problem is that splice_late_return_type is changing the TREE_TYPE of a REFERENCE_TYPE without also updating its TYPE_CANONICAL, which breaks; we need to rebuild the type instead. I expect that tsubst would do the trick, as in do_auto_deduction. Want to take this, Patrick?