From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) by sourceware.org (Postfix) with ESMTPS id CF2C03858D38 for ; Fri, 11 Nov 2022 20:34:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org CF2C03858D38 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=dabbelt.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=dabbelt.com Received: by mail-pj1-x102a.google.com with SMTP id k5so5329797pjo.5 for ; Fri, 11 Nov 2022 12:34:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dabbelt-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:to:from:cc :in-reply-to:subject:date:from:to:cc:subject:date:message-id :reply-to; bh=oKp+o8zm+SsB/lZZI2VlAs0J1vjTaEkTriJx4WLqTlg=; b=nMrsW9sHxM9G8cvpBjiZ7uKRwPQNanzYdOBzdK0RX7wdV+dTt6AuaQ2rlrVDatiHrk TRWFzRXh9rMZtUssHKMckHPs3gmmpqdDNCuBPCQDP1kR4f2M0b4nv2Ln6JdTnVTSc32B wZqCXZlfkn4VRnr0/UZzRBLMUhNgaNmxEA7OPeJEJ/0JCB+h5jRsX9b4Zg50egYtF9HM gpUKColEf+31k9Faqp0Uv7y09ywOiW1TVxQpydO8Q4h5KwMG7RdM69tokGqtF0lUrfRw ZMBjhy8LMNaUFFgONoNxBzUgZoDWC7rOVTd1r0SPM8QGITDb3gqERGqjokRdUWa5kdsM ekQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:to:from:cc :in-reply-to:subject:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=oKp+o8zm+SsB/lZZI2VlAs0J1vjTaEkTriJx4WLqTlg=; b=QspxlpkrondrKftmTJ4FL3SmDiJ76puWwf/UYOO7RiCw6zvpZbk/u/rXh+AumT2PaL Sp1Z/3fOkcH2NJKHqnKhDOKRSpQEKVTIq3U1PDsG0bvtymg9YCBoZigRerPJUtGb13Pa D+TIJzzOAJfcqG0r81LN5cGm5bu5yqjn61QiFT+HV9SEq0/mY/NQVPlkBqrSJUOkrC6p BzjUPoN4RbZzNylISNjybghkXcL6sQVXW9JU8+KiFqSFaI5DStI5BTa59IxHw0/BX6YR Fxe6TR8ziT212rKsccJUCxetQ8/W87Vz2ap2Cfw+WS+4xGqQLRrPbJjpR7q+tEBAbR9r JsTQ== X-Gm-Message-State: ANoB5pmK/SG6z/z+vO0J7gbtGGLw4tLPIXUmqqDMm8e3huFqPR7wT7KH LWl13Tmv+3bz1UIj/tiBGiv4aw== X-Google-Smtp-Source: AA0mqf5AAzB5c3z95AsFdEVeX7w4uMiwc0EtZVDbJVpsKHkOIZ2t/hKKCSQZwiIpJ0LchHG25YMSsg== X-Received: by 2002:a17:902:7205:b0:186:9cf4:e53b with SMTP id ba5-20020a170902720500b001869cf4e53bmr3850806plb.50.1668198852657; Fri, 11 Nov 2022 12:34:12 -0800 (PST) Received: from localhost ([50.221.140.188]) by smtp.gmail.com with ESMTPSA id b4-20020a1709027e0400b00177fb862a87sm2139130plm.20.2022.11.11.12.34.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Nov 2022 12:34:11 -0800 (PST) Date: Fri, 11 Nov 2022 12:34:11 -0800 (PST) X-Google-Original-Date: Fri, 11 Nov 2022 12:34:09 PST (-0800) Subject: Re: [PATCH] fix small const data for riscv In-Reply-To: CC: oriachiuan@gmail.com, gcc-patches@gcc.gnu.org, Kito Cheng , Andrew Waterman From: Palmer Dabbelt To: gcc-patches@gcc.gnu.org Message-ID: Mime-Version: 1.0 (MHng) Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-10.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,GIT_PATCH_0,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 Fri, 11 Nov 2022 11:56:08 PST (-0800), gcc-patches@gcc.gnu.org wrote: > On Fri, Nov 11, 2022 at 5:03 AM Oria Chen via Gcc-patches > wrote: >> >> gcc/testsuite ChangeLog: >> >> 2022-11-11 Oria Chen >> >> * gcc/testsuite/gcc.dg/pr25521.c: Add compile option "-msmall-data-limit=0" to avoid using .srodata section. > > I noticed g++.dg/cpp0x/constexpr-rom.C has some slightly different > handling here. > Seems like there should be a generic way to add > -G0/-msmall-data-limit=0 if we don't want small data for a testcase > rather than the current scheme of things. There's also a few tests like these where we modified the regex to match .sadata in addition to .data, which fixes the problem on MIPS too. > > Thanks, > Andrew Pinski > >> --- >> gcc/testsuite/gcc.dg/pr25521.c | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/gcc/testsuite/gcc.dg/pr25521.c b/gcc/testsuite/gcc.dg/pr25521.c >> index 74fe2ae6626..628ddf1a761 100644 >> --- a/gcc/testsuite/gcc.dg/pr25521.c >> +++ b/gcc/testsuite/gcc.dg/pr25521.c >> @@ -2,7 +2,8 @@ >> sections. >> >> { dg-require-effective-target elf } >> - { dg-do compile } */ >> + { dg-do compile } >> + { dg-options "-msmall-data-limit=0" { target { riscv*-*-* } } } */ >> >> const volatile int foo = 30; >> >> -- >> 2.37.2 >>