From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) by sourceware.org (Postfix) with ESMTPS id A53D339484A1 for ; Mon, 5 Dec 2022 18:47:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A53D339484A1 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-x62e.google.com with SMTP id jl24so11671195plb.8 for ; Mon, 05 Dec 2022 10:47:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=d3K+YLxKZSyQwMn17IEzp/etU7m+Dv6BBkIQwTGmSDk=; b=mB5wmNnc0FnJCdRscYbRgnPAOlwcvjihLWticUqHGSA15TgGe8saeb1NT9Yj3Q0Fl5 zEz++yxOSdff4Uq9iGbzatVA90hn7B0OA3yrFfnu67FxQGnadIIPf0XzT75HfPIvfBVZ utR+2AOW0Fk4F8VPN66iBjilxHw14dBEjoqaYEmDO2hgM9M/VeIDOPEU9ycBKYU8I7+z xKAbPG9P+c1egrDTnAj4Qej8T/btV9Zd3I8HH3hyhl8BmI0ZlAsnXt5BSU8Zm1kUu/QL mymIDapLiBi7/th5MFasmHg8ccN69CcJ2ze84fQLR1/DN9SW14Tmt8emWZ1/oJbfbDeQ gIlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=d3K+YLxKZSyQwMn17IEzp/etU7m+Dv6BBkIQwTGmSDk=; b=7rShtsVoiGpu61SyTRSLFX3radTVJsTaMjS9rDtJY9koT0jIV8FapGFFZ3mKCAhWi+ O0cJ9XsR6VVRE7IAEeFfyEE1HDtl1+8cSRl70us0GzBQV/5N9pTaGU2mHRs+fRPZBZTC kXIktnLjGuKymlq0+w7grbfPKgfgtbKaxKb+g5jnFC+rUThijk1yRAJEiEWRiWoYMTqZ 0WdS0WC5nRe60lCbX8EB+/SJamktpiAz4r3wCnuNhlCqSsqBlNrXH7+r7A5/6mySdKYL wejP6QzeVLcjqBgg4dY3ulv/OG+YqRGpypry5ebfraA4I85LXlLRmxKgYRYPT4p8UYtX 3XgA== X-Gm-Message-State: ANoB5plvK+36uln82UrGgmlzm0QOUWxQGk0gqWLnt5ya6/QNGL9S9WCW OULaEVWq0/v1LfTXiWU8OUk= X-Google-Smtp-Source: AA0mqf5xFW43rJjYd1Hq561hOaiyEG40GQX3dpFDsYAkm/qZPj/2CCi+L+RrlF5lyUXQ/JJoxHnSHg== X-Received: by 2002:a17:90a:b782:b0:219:2bc2:f71e with SMTP id m2-20020a17090ab78200b002192bc2f71emr42440886pjr.142.1670266046458; Mon, 05 Dec 2022 10:47:26 -0800 (PST) Received: from ?IPV6:2601:681:8600:13d0::f0a? ([2601:681:8600:13d0::f0a]) by smtp.gmail.com with ESMTPSA id q1-20020a170902dac100b0018941395c40sm10969082plx.285.2022.12.05.10.47.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 05 Dec 2022 10:47:25 -0800 (PST) Message-ID: <795fde7f-5bde-d1a5-e790-b15774effd1c@gmail.com> Date: Mon, 5 Dec 2022 11:47:24 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Subject: Re: [PATCH 2/2] Corrected pr25521.c target matching. Content-Language: en-US To: Cupertino Miranda , gcc-patches@gcc.gnu.org Cc: jose.marchesi@oracle.com References: <20221202175225.2780-1-cupertino.miranda@oracle.com> <20221202175225.2780-3-cupertino.miranda@oracle.com> From: Jeff Law In-Reply-To: <20221202175225.2780-3-cupertino.miranda@oracle.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 12/2/22 10:52, Cupertino Miranda via Gcc-patches wrote: > This commit is a follow up of bugzilla #107181. > > The commit /a0aafbc/ changed the default implementation of the > SELECT_SECTION hook in order to match clang/llvm behaviour w.r.t the > placement of `const volatile' objects. > > However, the following targets use target-specific selection functions > and they choke on the testcase pr25521.c: > > *rx - target sets its const variables as '.section C,"a",@progbits'. That's presumably a constant section. We should instead twiddle the test to recognize that section. > > *powerpc - its 32bit version is eager to allocate globals in .sdata > sections. > > Normally, one can expect for the variable to be allocated in .srodata, > however, in case of powerpc-*-* or powerpc64-*-* (with -m32) > 'targetm.have_srodata_section == false' and the code in > categorize_decl_for_section(varasm.cc), forces it to allocate in .sdata. > > /* If the target uses small data sections, select it. */ > else if (targetm.in_small_data_p (decl)) > { > if (ret == SECCAT_BSS) > ret = SECCAT_SBSS; > else if targetm.have_srodata_section && ret == SECCAT_RODATA) > ret = SECCAT_SRODATA; > else > ret = SECCAT_SDATA; > } I'd just skip the test for 32bit ppc. There should be suitable effective-target tests you can use. jeff