https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85076
--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Author: jakub Date: Mon Jun 25 17:40:52 2018 New Revision: 262087 URL: https://gcc.gnu.org/viewcvs?rev=262087&root=gcc&view=rev Log: Backported from mainline 2018-03-27 Jakub Jelinek <ja...@redhat.com> PR c++/85076 * tree.c (cp_build_reference_type): If to_type is error_mark_node, return it right away. * g++.dg/cpp1y/pr85076.C: New test. Added: branches/gcc-6-branch/gcc/testsuite/g++.dg/cpp1y/pr85076.C Modified: branches/gcc-6-branch/gcc/cp/ChangeLog branches/gcc-6-branch/gcc/cp/tree.c branches/gcc-6-branch/gcc/testsuite/ChangeLog