* [PATCH] testsuite: Add -fno-tree-loop-distribute-patterns for s390.
@ 2022-04-04 11:51 Robin Dapp
2022-04-04 13:21 ` Richard Biener
2022-04-05 5:25 ` Andreas Krebbel
0 siblings, 2 replies; 3+ messages in thread
From: Robin Dapp @ 2022-04-04 11:51 UTC (permalink / raw)
To: GCC Patches
Hi,
in gcc.dg/Wuse-after-free-2.c we try to detect a use-after-free. On
s390 the test's while loop is converted into a rawmemchr builtin making
it impossible to determine that the pointers *p and *q are related.
Therefore, disable the tree loop distribute patterns pass on s390 for
this test.
OK for trunk?
Regards
Robin
gcc/testsuite/ChangeLog:
* gcc.dg/Wuse-after-free-2.c:
Add -fno-tree-loop-distribute-patterns for s390*.
---
diff --git a/gcc/testsuite/gcc.dg/Wuse-after-free-2.c
b/gcc/testsuite/gcc.dg/Wuse-after-free-2.c
index 9f7ed4529f0..3a8f690e9f8 100644
--- a/gcc/testsuite/gcc.dg/Wuse-after-free-2.c
+++ b/gcc/testsuite/gcc.dg/Wuse-after-free-2.c
@@ -1,6 +1,8 @@
/* PR middle-end/104232 - spurious -Wuse-after-free after conditional free
{ dg-do compile }
- { dg-options "-O2 -Wall" } */
+ { dg-options "-O2 -Wall" }
+ { dg-additional-options "-fno-tree-loop-distribute-patterns" {
target { s390*-*-* } } }
+ */
void free (void*);
--
2.35.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] testsuite: Add -fno-tree-loop-distribute-patterns for s390.
2022-04-04 11:51 [PATCH] testsuite: Add -fno-tree-loop-distribute-patterns for s390 Robin Dapp
@ 2022-04-04 13:21 ` Richard Biener
2022-04-05 5:25 ` Andreas Krebbel
1 sibling, 0 replies; 3+ messages in thread
From: Richard Biener @ 2022-04-04 13:21 UTC (permalink / raw)
To: Robin Dapp; +Cc: GCC Patches
On Mon, Apr 4, 2022 at 1:52 PM Robin Dapp via Gcc-patches
<gcc-patches@gcc.gnu.org> wrote:
>
> Hi,
>
> in gcc.dg/Wuse-after-free-2.c we try to detect a use-after-free. On
> s390 the test's while loop is converted into a rawmemchr builtin making
> it impossible to determine that the pointers *p and *q are related.
>
> Therefore, disable the tree loop distribute patterns pass on s390 for
> this test.
>
> OK for trunk?
>
> Regards
> Robin
>
> gcc/testsuite/ChangeLog:
>
> * gcc.dg/Wuse-after-free-2.c:
> Add -fno-tree-loop-distribute-patterns for s390*.
>
>
> ---
> diff --git a/gcc/testsuite/gcc.dg/Wuse-after-free-2.c
> b/gcc/testsuite/gcc.dg/Wuse-after-free-2.c
> index 9f7ed4529f0..3a8f690e9f8 100644
> --- a/gcc/testsuite/gcc.dg/Wuse-after-free-2.c
> +++ b/gcc/testsuite/gcc.dg/Wuse-after-free-2.c
> @@ -1,6 +1,8 @@
> /* PR middle-end/104232 - spurious -Wuse-after-free after conditional free
> { dg-do compile }
> - { dg-options "-O2 -Wall" } */
> + { dg-options "-O2 -Wall" }
> + { dg-additional-options "-fno-tree-loop-distribute-patterns" {
> target { s390*-*-* } } }
Please add the option unconditional and add a comment wrt rawmemchr
OK with that change.
> + */
>
> void free (void*);
>
> --
> 2.35.1
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] testsuite: Add -fno-tree-loop-distribute-patterns for s390.
2022-04-04 11:51 [PATCH] testsuite: Add -fno-tree-loop-distribute-patterns for s390 Robin Dapp
2022-04-04 13:21 ` Richard Biener
@ 2022-04-05 5:25 ` Andreas Krebbel
1 sibling, 0 replies; 3+ messages in thread
From: Andreas Krebbel @ 2022-04-05 5:25 UTC (permalink / raw)
To: Robin Dapp, GCC Patches
On 4/4/22 13:51, Robin Dapp wrote:
> Hi,
>
> in gcc.dg/Wuse-after-free-2.c we try to detect a use-after-free. On
> s390 the test's while loop is converted into a rawmemchr builtin making
> it impossible to determine that the pointers *p and *q are related.
>
> Therefore, disable the tree loop distribute patterns pass on s390 for
> this test.
>
> OK for trunk?
>
> Regards
> Robin
>
> gcc/testsuite/ChangeLog:
>
> * gcc.dg/Wuse-after-free-2.c:
> Add -fno-tree-loop-distribute-patterns for s390*.
Ok. Thanks!
Andreas
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-04-05 5:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-04 11:51 [PATCH] testsuite: Add -fno-tree-loop-distribute-patterns for s390 Robin Dapp
2022-04-04 13:21 ` Richard Biener
2022-04-05 5:25 ` Andreas Krebbel
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).