From patchwork Wed Jan 6 09:17:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kito Cheng X-Patchwork-Id: 1422867 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=sifive.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=sifive.com header.i=@sifive.com header.a=rsa-sha256 header.s=google header.b=MqNLRybp; dkim-atps=neutral Received: from sourceware.org (unknown [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D9kKT4c0Fz9sTv for ; Wed, 6 Jan 2021 20:17:31 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3134B3870868; Wed, 6 Jan 2021 09:17:27 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) by sourceware.org (Postfix) with ESMTPS id 6D02F38618B8 for ; Wed, 6 Jan 2021 09:17:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 6D02F38618B8 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=sifive.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=kito.cheng@sifive.com Received: by mail-pj1-x102f.google.com with SMTP id j13so1277257pjz.3 for ; Wed, 06 Jan 2021 01:17:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=mUk7flg1MfRk8VQL7iJZGNnWsG5QpZEPHKn+MU6s1Ok=; b=MqNLRybpZgI0zdej+TagohNZVOe1/TJ9b0D2TvV34X55LWti11UWxq96+Ul82i8oLc hplcBPrlt2CjMcVKhvfi95/4iJvLyCNX7WLfHQ3lkOcLXxioO5ZX8YF3kmdi1O9GjMAa 5tLIfrJ7Ubcgdmgg0Flr6JXphRtF2yIX4fqtYC+zPjDugCDKY1B20iscc3P3ihpPrCt/ bhhexCN/QkQxBIh/pKFS7c/8xfyCJ7IZjrVP4gG/heMTKkOq8OlBybR35CG6fQ+aqZFC hY5v9NPf8c/RheEzltGvpx7n0DOkO2/MrOAqMgkmuoAJWjPUH3HLiPF4epexmxqfTo9O DuVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=mUk7flg1MfRk8VQL7iJZGNnWsG5QpZEPHKn+MU6s1Ok=; b=TP3zb/js7616cIfVxSmDBFyVPO2ZnLNJ8upgQ0nR5vgMPq1qZp00Eapcge82ZZ8epl 4atHqgXkFjCT1b/I0nQOek78QgdHkfw63zLAj9upAQ5mWy/87BUstf79zoVdynFKeiiI WrGjxYpQJhLrIgMCLTeyuWTb4lcje3qOHLg1t+dCDQI7UKXFK1VWRw1w3PUeijYvBlYD iAmwG+9WfVNMGajufXTgwoV9sHqsjy0AyWgs8uH9yoxvOBmOUI5gqQLH8GyIdEk6ew/z ougDiGwX8kGI/CUhJ4YbAU+vOOlYe7XfZZCjJzj4iq/5DOBElIe5Uu4lVf7ScJNyjuhT rh4A== X-Gm-Message-State: AOAM530lrNv72QISbVS6YtfYfMHAzz7febZ9+1EQcrBpEsm8DAYDKqAf ATirmWB7JhhJF8GafoD+BV1SfOsEe0mP6ODh X-Google-Smtp-Source: ABdhPJzYh568fzNK6E4Jlm91tKL7tbfGFyvfR15R561K2+8acXNtQlMiKvvCt1Gjv5OFoHdX2QRYxQ== X-Received: by 2002:a17:902:be02:b029:da:c6c9:c9db with SMTP id r2-20020a170902be02b02900dac6c9c9dbmr3236159pls.69.1609924641876; Wed, 06 Jan 2021 01:17:21 -0800 (PST) Received: from hsinchu02.internal.sifive.com (114-34-229-221.HINET-IP.hinet.net. [114.34.229.221]) by smtp.gmail.com with ESMTPSA id n7sm1728410pfn.141.2021.01.06.01.17.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Jan 2021 01:17:21 -0800 (PST) From: Kito Cheng To: gcc-patches@gcc.gnu.org, kito.cheng@gmail.com, jimw@sifive.com Subject: [PATCH] Fix array-quals-1.c for RISC-V Date: Wed, 6 Jan 2021 17:17:14 +0800 Message-Id: <20210106091714.110709-1-kito.cheng@sifive.com> X-Mailer: git-send-email 2.30.0 MIME-Version: 1.0 X-Spam-Status: No, score=-13.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kito Cheng Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" RISC-V will put those variable on srodata rather than rodata. gcc/testsuite/ChangeLog: * gcc.dg/array-quals-1.c: Allow srodata. --- gcc/testsuite/gcc.dg/array-quals-1.c | 40 ++++++++++++++-------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/gcc/testsuite/gcc.dg/array-quals-1.c b/gcc/testsuite/gcc.dg/array-quals-1.c index 31aa1d3cb3f..c8d36296434 100644 --- a/gcc/testsuite/gcc.dg/array-quals-1.c +++ b/gcc/testsuite/gcc.dg/array-quals-1.c @@ -6,46 +6,46 @@ /* { dg-options "-Wno-discarded-array-qualifiers" } */ /* The MMIX port always switches to the .data section at the end of a file. */ /* { dg-final { scan-assembler-not "\\.data(?!\\.rel\\.ro)" { xfail powerpc*-*-aix* mmix-*-* x86_64-*-mingw* } } } */ -/* { dg-final { scan-assembler-symbol-section {^_?a$} {^\.(const|rodata)|\[RO\]} } } */ +/* { dg-final { scan-assembler-symbol-section {^_?a$} {^\.(const|rodata|srodata)|\[RO\]} } } */ static const int a[2] = { 1, 2 }; -/* { dg-final { scan-assembler-symbol-section {^_?a1$} {^\.(const|rodata)|\[RO\]} } } */ +/* { dg-final { scan-assembler-symbol-section {^_?a1$} {^\.(const|rodata|srodata)|\[RO\]} } } */ const int a1[2] = { 1, 2 }; typedef const int ci; -/* { dg-final { scan-assembler-symbol-section {^_?b$} {^\.(const|rodata)|\[RO\]} } } */ +/* { dg-final { scan-assembler-symbol-section {^_?b$} {^\.(const|rodata|srodata)|\[RO\]} } } */ static ci b[2] = { 3, 4 }; -/* { dg-final { scan-assembler-symbol-section {^_?b1$} {^\.(const|rodata)|\[RO\]} } } */ +/* { dg-final { scan-assembler-symbol-section {^_?b1$} {^\.(const|rodata|srodata)|\[RO\]} } } */ ci b1[2] = { 3, 4 }; typedef int ia[2]; -/* { dg-final { scan-assembler-symbol-section {^_?c$} {^\.(const|rodata)|\[RO\]} } } */ +/* { dg-final { scan-assembler-symbol-section {^_?c$} {^\.(const|rodata|srodata)|\[RO\]} } } */ static const ia c = { 5, 6 }; -/* { dg-final { scan-assembler-symbol-section {^_?c1$} {^\.(const|rodata)|\[RO\]} } } */ +/* { dg-final { scan-assembler-symbol-section {^_?c1$} {^\.(const|rodata|srodata)|\[RO\]} } } */ const ia c1 = { 5, 6 }; typedef const int cia[2]; -/* { dg-final { scan-assembler-symbol-section {^_?d$} {^\.(const|rodata)|\[RO\]} } } */ +/* { dg-final { scan-assembler-symbol-section {^_?d$} {^\.(const|rodata|srodata)|\[RO\]} } } */ static cia d = { 7, 8 }; -/* { dg-final { scan-assembler-symbol-section {^_?d1$} {^\.(const|rodata)|\[RO\]} } } */ +/* { dg-final { scan-assembler-symbol-section {^_?d1$} {^\.(const|rodata|srodata)|\[RO\]} } } */ cia d1 = { 7, 8 }; -/* { dg-final { scan-assembler-symbol-section {^_?e$} {^\.(const|rodata)|\[RO\]} } } */ +/* { dg-final { scan-assembler-symbol-section {^_?e$} {^\.(const|rodata|srodata)|\[RO\]} } } */ static cia e[2] = { { 1, 2 }, { 3, 4 } }; -/* { dg-final { scan-assembler-symbol-section {^_?e1$} {^\.(const|rodata)|\[RO\]} } } */ +/* { dg-final { scan-assembler-symbol-section {^_?e1$} {^\.(const|rodata|srodata)|\[RO\]} } } */ cia e1[2] = { { 1, 2 }, { 3, 4 } }; -/* { dg-final { scan-assembler-symbol-section {^_?p$} {^\.(const|rodata)|\[RW\]} } } */ +/* { dg-final { scan-assembler-symbol-section {^_?p$} {^\.(const|rodata|srodata)|\[RW\]} } } */ void *const p = &a; -/* { dg-final { scan-assembler-symbol-section {^_?q$} {^\.(const|rodata)|\[RW\]} } } */ +/* { dg-final { scan-assembler-symbol-section {^_?q$} {^\.(const|rodata|srodata)|\[RW\]} } } */ void *const q = &b; -/* { dg-final { scan-assembler-symbol-section {^_?r$} {^\.(const|rodata)|\[RW\]} } } */ +/* { dg-final { scan-assembler-symbol-section {^_?r$} {^\.(const|rodata|srodata)|\[RW\]} } } */ void *const r = &c; -/* { dg-final { scan-assembler-symbol-section {^_?s$} {^\.(const|rodata)|\[RW\]} } } */ +/* { dg-final { scan-assembler-symbol-section {^_?s$} {^\.(const|rodata|srodata)|\[RW\]} } } */ void *const s = &d; -/* { dg-final { scan-assembler-symbol-section {^_?t$} {^\.(const|rodata)|\[RW\]} } } */ +/* { dg-final { scan-assembler-symbol-section {^_?t$} {^\.(const|rodata|srodata)|\[RW\]} } } */ void *const t = &e; -/* { dg-final { scan-assembler-symbol-section {^_?p1$} {^\.(const|rodata)|\[RW\]} } } */ +/* { dg-final { scan-assembler-symbol-section {^_?p1$} {^\.(const|rodata|srodata)|\[RW\]} } } */ void *const p1 = &a1; -/* { dg-final { scan-assembler-symbol-section {^_?q1$} {^\.(const|rodata)|\[RW\]} } } */ +/* { dg-final { scan-assembler-symbol-section {^_?q1$} {^\.(const|rodata|srodata)|\[RW\]} } } */ void *const q1 = &b1; -/* { dg-final { scan-assembler-symbol-section {^_?r1$} {^\.(const|rodata)|\[RW\]} } } */ +/* { dg-final { scan-assembler-symbol-section {^_?r1$} {^\.(const|rodata|srodata)|\[RW\]} } } */ void *const r1 = &c1; -/* { dg-final { scan-assembler-symbol-section {^_?s1$} {^\.(const|rodata)|\[RW\]} } } */ +/* { dg-final { scan-assembler-symbol-section {^_?s1$} {^\.(const|rodata|srodata)|\[RW\]} } } */ void *const s1 = &d1; -/* { dg-final { scan-assembler-symbol-section {^_?t1$} {^\.(const|rodata)|\[RW\]} } } */ +/* { dg-final { scan-assembler-symbol-section {^_?t1$} {^\.(const|rodata|srodata)|\[RW\]} } } */ void *const t1 = &e1;