From patchwork Mon Jun 4 15:44:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Polacek X-Patchwork-Id: 925122 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-479031-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="FPwu8G0w"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40zzm00BDPz9rvt for ; Tue, 5 Jun 2018 01:45:19 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; q=dns; s= default; b=uQzLtgR5j0kE4MMGGE+7M+2HvGKAE17YL8PVeJX1emMWBD4eTi9pQ IDbuxJFifSvHJoFx5ZlGFGdhsaILM7rwD5XhJigTHW1aP6nJHfbnX+ghT6dr+v0s 5u4iTdXRf02DZJsRzpRzipsUgWeOUApZNvHS/O9Yi0ZoILNxKvZkow= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; s= default; bh=ZNekFRDzbF/Bu/hRW+5dBaMrJIo=; b=FPwu8G0w4/zKT9rjmR6C GqcSO7XwAXcYfLnhoIjzUwEXTLRqd9CRbUct0dxNvz6xJdo/sA1625Hs0NDj65Pu j4DGnuvBpx4R+eh843H2Wu/fmqAtMl3o0OAoJ4Mm9FD3ZQ3xqx9pbuLN4e4vwSTJ +DGHG03ZwGUyYC8uZTGQueQ= Received: (qmail 87246 invoked by alias); 4 Jun 2018 15:45:05 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 86847 invoked by uid 89); 4 Jun 2018 15:45:02 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-12.7 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_SHORT, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com Received: from mx3-rdu2.redhat.com (HELO mx1.redhat.com) (66.187.233.73) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 04 Jun 2018 15:45:01 +0000 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A7E9D7A7E1 for ; Mon, 4 Jun 2018 15:44:59 +0000 (UTC) Received: from redhat.com (ovpn-125-2.rdu2.redhat.com [10.10.125.2]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7EC58200BCD9; Mon, 4 Jun 2018 15:44:59 +0000 (UTC) Date: Mon, 4 Jun 2018 11:44:58 -0400 From: Marek Polacek To: GCC Patches , Jason Merrill Subject: C++ PATCH for c++/85976, ICE with USING_DECL in cp_tree_equal Message-ID: <20180604154458.GD23949@redhat.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.9.5 (2018-04-13) I've had no luck in reducing the testcase in this PR, creduce won't get even past the initial passes, and reducing by hand didn't get me very far, either. But the problem seems to be merely that we're not handling USING_DECLs in cp_tree_equal, and we can get there via comp_template_arguments. In this case we have two USING_DECLs with different full names. So this patch just adds the USING_DECL case, similarly to e.g. https://gcc.gnu.org/ml/gcc-patches/2012-10/msg00799.html Bootstrapped/regtested on x86_64-linux, ok for trunk/8? I verified manually that this fixes the testcase from the PR. 2018-06-04 Marek Polacek PR c++/85976 * tree.c (cp_tree_equal): Handle USING_DECL. Marek --- gcc/cp/tree.c +++ gcc/cp/tree.c @@ -3752,6 +3752,7 @@ cp_tree_equal (tree t1, tree t2) case TEMPLATE_DECL: case IDENTIFIER_NODE: case SSA_NAME: + case USING_DECL: return false; case BASELINK: