From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 95760 invoked by alias); 14 Jun 2018 16:59:25 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 95601 invoked by uid 89); 14 Jun 2018 16:59:23 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 spammy= X-HELO: mail-ot0-f193.google.com Received: from mail-ot0-f193.google.com (HELO mail-ot0-f193.google.com) (74.125.82.193) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 14 Jun 2018 16:59:22 +0000 Received: by mail-ot0-f193.google.com with SMTP id c15-v6so7895541otl.3 for ; Thu, 14 Jun 2018 09:59:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=yS8BBLlTSN0ZxquxmF7XGJJf42bElua38CiiY58wy84=; b=Ch70bHvT3uOudrhPnTslIumLvRnqBiVHkIjHQsRIttQwfP7xMX/FHH6rDkhIqVbfgZ haZ8EDb+Q1cjHWzWdV4lijcnab/zO+kvc48om+FftbXaoGUUQ8fppBgk5krcVNOEhPdL sQdBoMP9fdb/3ykPaOomZKVJuliud69SDHDwwYjErqmi7/d5l4meMrDQvNaQJGP725/D 9Vi8/VZrbCV37dPw5Vdd1zwXIays/IHecofn6fM2MR3T5lud/fZKhrCMVuula5CiwenZ zf7C3KpiqUWVO11eUpGhkoALU0w1wcv6fDIXz+9232ZsS1Q7cNtocAvfaCP7XA9rNfXs Vyzg== X-Gm-Message-State: APt69E3sdriFs+6dPq6R7Bytchoo7bR/5ZVszrUWPq3tmFiv5Gmd82br JR+Q74dNRhFGw5MdVySzpmsGE0nmHA364QG9oqMryX5I X-Google-Smtp-Source: ADUXVKLWQ/IP91DkNMwmHjLqxW5kJraHLbXEak+BleRz5XeeVjiiEJphhWR3DDybxiP8h5u7J2xA0dRXmnrP5eibQts= X-Received: by 2002:a9d:caf:: with SMTP id b44-v6mr1722650otb.270.1528995560853; Thu, 14 Jun 2018 09:59:20 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:ac9:dd0:0:0:0:0:0 with HTTP; Thu, 14 Jun 2018 09:59:00 -0700 (PDT) In-Reply-To: <20180614165107.GG17989@redhat.com> References: <20180606211835.GC28085@redhat.com> <20180614165107.GG17989@redhat.com> From: Jason Merrill Date: Thu, 14 Jun 2018 16:59:00 -0000 Message-ID: Subject: Re: C++ PATCH for c++/86063, ICE with attribute with pack expansion To: Marek Polacek Cc: GCC Patches Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2018-06/txt/msg00862.txt.bz2 On Thu, Jun 14, 2018 at 12:51 PM, Marek Polacek wrote: > On Mon, Jun 11, 2018 at 03:00:04PM -0400, Jason Merrill wrote: >> On Wed, Jun 6, 2018 at 5:18 PM, Marek Polacek wrote: >> > We crash on this testcase containing a bogus attribute, because >> > cp_check_const_attributes accessed TREE_VALUE of a tree that happened to be >> > expr_pack_expansion. Since here we're merely trying to evaluate constexpr >> > arguments, I thought we could skip such bogus arguments. >> >> Hmm, attributes should always be a TREE_LIST, lots of places assume >> that. Why isn't the pack expansion wrapped in a TREE_LIST? > > I believe you did that on purpose. There pack comes from > cp_parser_std_attribute_list. We could wrap it into a TREE_LIST, but then > tsubst_attribute would have to be tweaked to handle the pack expansion > correctly. How so? tsubst_attribute expects to find a pack expansion in the TREE_VALUE of a TREE_LIST. And cp_parser_std_attribute_list puts the pack expansion in TREE_VALUE. Jason