From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26335 invoked by alias); 1 Aug 2014 18:34:28 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 25661 invoked by uid 55); 1 Aug 2014 18:34:22 -0000 From: "jason at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/59956] [4.8 regression] internal compiler error:=?UTF-8?Q?=20unexpected=20expression=20=E2=80=98P=5FS=E2=80=99=20of=20kind=20template=5Fparm=5Findex?= Date: Fri, 01 Aug 2014 18:34:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 4.8.2 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jason at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: jason at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.8.4 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-08/txt/msg00074.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59956 --- Comment #8 from Jason Merrill --- Author: jason Date: Fri Aug 1 18:33:47 2014 New Revision: 213501 URL: https://gcc.gnu.org/viewcvs?rev=213501&root=gcc&view=rev Log: PR c++/59956 * friend.c (do_friend): Pass the TEMPLATE_DECL to add_friend if we have a friend template in a class template. * pt.c (tsubst_friend_function): Look through it. (push_template_decl_real): A friend member template is primary. Added: branches/gcc-4_8-branch/gcc/testsuite/g++.dg/template/friend55.C Modified: branches/gcc-4_8-branch/gcc/cp/ChangeLog branches/gcc-4_8-branch/gcc/cp/friend.c branches/gcc-4_8-branch/gcc/cp/pt.c