public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Xing GUO <higuoxing@gmail.com>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: Xing GUO via Gcc-patches <gcc-patches@gcc.gnu.org>,
	Kito Cheng <kito.cheng@sifive.com>,
	Kito Cheng <kito.cheng@gmail.com>
Subject: Re: [PATCH] RISC-V: Fix -march option parsing when `p` extension exists.
Date: Mon, 1 Feb 2021 16:58:20 +0800	[thread overview]
Message-ID: <CACpMh+D6KZODfiBLPwrbBY-u8NUgJX-Vx6vNs=q=ztgqS0teZQ@mail.gmail.com> (raw)
In-Reply-To: <CACpMh+CgnARKBV-MFc_78r21gPf4g54cv2e9WZJ6Q5fuz5j+kQ@mail.gmail.com>

Hi,

I've reproduced the failure. It's because my gcc is configured as a
bare-metal toolchain and built with binutils that supports RISC-V
attribute. That is to say, my gcc emits RISC-V attributes by default.
Below is the patch that should fix the failure. Sorry for the
inconvenience.

diff --git a/gcc/testsuite/gcc.target/riscv/attribute-18.c
b/gcc/testsuite/gcc.target/riscv/attribute-18.c
index 1fd80fed51b..492360cf7c1 100644
--- a/gcc/testsuite/gcc.target/riscv/attribute-18.c
+++ b/gcc/testsuite/gcc.target/riscv/attribute-18.c
@@ -1,4 +1,4 @@
 /* { dg-do compile } */
-/* { dg-options "-march=rv64imafdcp -mabi=lp64d -misa-spec=2.2" } */
+/* { dg-options "-mriscv-attribute -march=rv64imafdcp -mabi=lp64d
-misa-spec=2.2" } */
 int foo() {}
 /* { dg-final { scan-assembler ".attribute arch,
\"rv64i2p0_m2p0_a2p0_f2p0_d2p0_c2p0_p\"" } } */

On 2/1/21, Xing GUO <higuoxing@gmail.com> wrote:
> Hi Andreas and Kito,
>
> I haven't reproduced this failure, but it looks that I forget to
> append `-mriscv-attribute` to dg-options in attribute-18.c. I'll reply
> to this thread ASAP.
>
> Thanks,
> Xing
>
> On 2/1/21, Andreas Schwab <schwab@linux-m68k.org> wrote:
>> FAIL: gcc.target/riscv/attribute-18.c scan-assembler .attribute arch,
>> "rv64i2p0_m2p0_a2p0_f2p0_d2p0_c2p0_p"
>>
>> $ grep -c 'attribute arch' attribute-18.s
>> 0
>>
>> Andreas.
>>
>> --
>> Andreas Schwab, schwab@linux-m68k.org
>> GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
>> "And now for something completely different."
>>
>
>
> --
> Cheers,
> Xing
>


-- 
Cheers,
Xing

  reply	other threads:[~2021-02-01  8:58 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-21 12:48 Xing GUO
2021-01-22  6:26 ` Kito Cheng
2021-01-22  6:44   ` Xing GUO
2021-01-22  6:48     ` Kito Cheng
2021-01-27  1:46       ` Xing GUO
2021-01-27  5:54         ` Xing GUO
2021-01-28  3:27           ` Kito Cheng
2021-01-31 18:38           ` Andreas Schwab
2021-02-01  0:59             ` Xing GUO
2021-02-01  8:58               ` Xing GUO [this message]
2021-02-01  9:36                 ` Kito Cheng
2021-02-04 23:48       ` Jim Wilson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CACpMh+D6KZODfiBLPwrbBY-u8NUgJX-Vx6vNs=q=ztgqS0teZQ@mail.gmail.com' \
    --to=higuoxing@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=kito.cheng@gmail.com \
    --cc=kito.cheng@sifive.com \
    --cc=schwab@linux-m68k.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).