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 <higuox...@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 <sch...@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, sch...@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 via email to