From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12030 invoked by alias); 24 Nov 2017 13:31:24 -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 11584 invoked by uid 89); 24 Nov 2017 13:31:23 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,KB_WAM_FROM_NAME_SINGLEWORD,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=Hx-languages-length:716, sk:perform X-HELO: mail3-relais-sop.national.inria.fr Received: from mail3-relais-sop.national.inria.fr (HELO mail3-relais-sop.national.inria.fr) (192.134.164.104) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 24 Nov 2017 13:31:21 +0000 Received: from ip-4.net-89-2-164.rev.numericable.fr (HELO stedding) ([89.2.164.4]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Nov 2017 14:31:19 +0100 Date: Fri, 24 Nov 2017 14:26:00 -0000 From: Marc Glisse To: Jason Merrill cc: gcc-patches List Subject: Re: RFA (libstdc++): PATCH to implement C++17 over-aligned new In-Reply-To: Message-ID: References: User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII X-SW-Source: 2017-11/txt/msg02207.txt.bz2 Hello, @@ -4247,9 +4248,20 @@ build_operator_new_call (tree fnname, vec **args, we disregard block-scope declarations of "operator new". */ fns = lookup_function_nonclass (fnname, *args, /*block_p=*/false); + if (align_arg) + { + vec* align_args + = vec_copy_and_insert (*args, align_arg, 1); + cand = perform_overload_resolution (fns, align_args, &candidates, + &any_viable_p, tf_none); + /* If no aligned allocation function matches, try again without the + alignment. */ + } + Code further in the function expects to be able to adjust args, which is defeated by copying them in align_args, see PR 82760. -- Marc Glisse