public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: chenglulu <chenglulu@loongson.cn>
To: Xi Ruoyao <xry111@xry111.site>, gcc-patches@gcc.gnu.org
Cc: i@xen0n.name, xuchenghua@loongson.cn
Subject: Re: [PATCH] LoongArch: testsuite: Disable stack protector for got-load.C
Date: Tue, 23 Jan 2024 20:53:49 +0800	[thread overview]
Message-ID: <9b5372d0-1c5d-ff71-77b0-b32c7d68ad16@loongson.cn> (raw)
In-Reply-To: <20240123113723.39849-1-xry111@xry111.site>

LGTM!

Thanks!

在 2024/1/23 下午7:35, Xi Ruoyao 写道:
> When building GCC with --enable-default-ssp, the stack protector is
> enabled for got-load.C, causing additional GOT loads for
> __stack_chk_guard.  So mem/u will be matched more than 2 times and the
> test will fail.
>
> Disable stack protector to fix this issue.
>
> gcc/testsuite:
>
> 	* g++.target/loongarch/got-load.C (dg-options): Add
> 	-fno-stack-protector.
> ---
>
> Ok for trunk?
>
>   gcc/testsuite/g++.target/loongarch/got-load.C | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/gcc/testsuite/g++.target/loongarch/got-load.C b/gcc/testsuite/g++.target/loongarch/got-load.C
> index 20924c73942..17870176ab4 100644
> --- a/gcc/testsuite/g++.target/loongarch/got-load.C
> +++ b/gcc/testsuite/g++.target/loongarch/got-load.C
> @@ -1,5 +1,5 @@
>   /* { dg-do compile } */
> -/* { dg-options "-mabi=lp64d -O2 -mexplicit-relocs -mcmodel=normal -fdump-rtl-expand" } */
> +/* { dg-options "-mabi=lp64d -O2 -mexplicit-relocs -mcmodel=normal -fdump-rtl-expand -fno-stack-protector" } */
>   /* { dg-final { scan-rtl-dump-times "mem/u" 2 "expand" } } */
>   
>   #include <bits/stdc++.h>


      reply	other threads:[~2024-01-23 12:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-23 11:35 Xi Ruoyao
2024-01-23 12:53 ` chenglulu [this message]

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=9b5372d0-1c5d-ff71-77b0-b32c7d68ad16@loongson.cn \
    --to=chenglulu@loongson.cn \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=i@xen0n.name \
    --cc=xry111@xry111.site \
    --cc=xuchenghua@loongson.cn \
    /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).