This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: C++ PATCH for c++/54575 (ICE with alias template)
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: Jason Merrill <jason at redhat dot com>
- Cc: gcc-patches List <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 18 Sep 2012 00:22:52 -0500
- Subject: Re: C++ PATCH for c++/54575 (ICE with alias template)
- References: <5057ED03.7000107@redhat.com>
On Mon, Sep 17, 2012 at 10:39 PM, Jason Merrill <jason@redhat.com> wrote:
> The change to make SCOPE_REFs value-dependent revealed a bug in our handling
> of alias-template instantiations; we weren't pushing into the context of the
> alias before substituting the type, and then we were remembering the
> previously instantiated one when instantiating in a different context. If
> the difference in context makes a difference, for instance in access
> control, this is broken.
>
> There are two possible ways to fix this: either push into the context of the
> alias or don't remember instantiations. EDG takes the former approach,
> clang the latter. I've raised the issue with the committee, but for the
> moment I'm following the EDG approach.
>
> Tested x86_64-pc-linux-gnu, applying to trunk.
I endorse the EDG interpretation.
-- Gaby