From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 49071 invoked by alias); 17 Feb 2018 19:15:56 -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 49050 invoked by uid 89); 17 Feb 2018 19:15:55 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-wm0-f52.google.com Received: from mail-wm0-f52.google.com (HELO mail-wm0-f52.google.com) (74.125.82.52) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 17 Feb 2018 19:15:54 +0000 Received: by mail-wm0-f52.google.com with SMTP id k87so8565470wmi.0 for ; Sat, 17 Feb 2018 11:15:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=xMlWLXiRmgXG8SrxsAoD+67/1DvV5Mz/qiF4H6lzSsA=; b=CalSCusOfO3HyNRYKXte/sMlYLsdNLjSgYFJg0FgdHpHZ9IyQDgRBW9NcJUptOD0+d TUJtzPtj5Z9eOtf9zbsic/1pyvxy3B1l2ZviJcctKTBiVk8mHH+QHjmsizFoWKEL5pKl 6ZlNFiqe57lHMg8dCaa4r7j5ZviudUqZ3LBvOKJ594v0tBfWomhYaaWrp4isA0fuQPWQ 1ZlKJoiEWE7mqME1LkjFPARXb8l6sgJKyPFIZuMKi3XQAz6A8+hqWW4ABpwEEbDEr2fy qRT3Yj5m1CINhHyabzrc4CLxiNnE0wnWEDH2KvoCEp51yNoyNSFe3L6u0YcmAWsDj2Os z+Ow== X-Gm-Message-State: APf1xPDTPgE9GJj2vb7Ex/0UmA60V0mgDKxjrKg3l74BZtVyQd7mbfk6 2eEbGH+taIizZTQYtjI9nlw= X-Google-Smtp-Source: AH8x226FAX1vZJSndRyBOxELK0UYOJKXH6HhgNF1KXc8gjMtmNuuUNfBGIfzC6JR30MD6+lO1UtqSQ== X-Received: by 10.80.153.110 with SMTP id l43mr5742058edb.245.1518894951908; Sat, 17 Feb 2018 11:15:51 -0800 (PST) Received: from [10.53.104.90] ([88.128.82.79]) by smtp.googlemail.com with ESMTPSA id m1sm6324522ede.39.2018.02.17.11.15.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 17 Feb 2018 11:15:51 -0800 (PST) Subject: Re: RFC (DECL_CONSTRUCTOR_P): C++ PATCH for c++/83911, ICE with multiversioned constructor To: Jason Merrill Cc: gcc-patches List References: From: Nathan Sidwell Message-ID: Date: Sat, 17 Feb 2018 19:15:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2018-02/txt/msg01062.txt.bz2 On 02/16/2018 05:48 PM, Jason Merrill wrote: > We hit the bug in this testcase because build_over_call replaces the > constructor with a dispatcher function, and then build_aggr_init_expr > doesn't recognize it as a constructor. > > Messing with the DECL_NAME of the dispatcher seems messy, but copying > the DECL_CXX_CONSTRUCTOR_P flag is easy. So we can change the test in > build_aggr_init_expr, or change the definition of DECL_CONSTRUCTOR_P. > I lean toward the latter as more uniform, but not strongly. Do you > have an opinion? Yeah, I think copying DECL_CXX_CONSTRUCTOR_P is the right approach. I wondered about dtors, operator fns and conversion fns. They also rely on identifier flags. dtors ICEs add_method (feel free to file a defect and assign to me). assignment operator seems ok. That assop is ok, suggests the change to mangle.c isn;t needed -- we mangle the name early enough? [We could move CXX_{CON,DE}STRUCTOR_P functionality into the operator enumeration to free up a couple of flags, but that's definitely a stage 1 change] nathan -- Nathan Sidwell