https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86823
Alexandre Oliva <aoliva at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |aoliva at gcc dot gnu.org --- Comment #4 from Alexandre Oliva <aoliva at gcc dot gnu.org> --- I've just spent quite some time debugging this. The problem, summed up, is that the firewall is introduced after the access check of the template id is deferred, but when we save the resolved token along with deferred checks, we take only the access checks pushed within the firewall. The deferred check left upstack is eventually discarded, but the resolved id is used.