public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH 1/2] testsuite/unroll-8: Avoid triggering undefined behavior
@ 2023-11-21 23:27 Palmer Dabbelt
  2023-11-21 23:27 ` [PATCH 2/2] testsuite/unroll-8: Disable vectorization for varibale-factor targets Palmer Dabbelt
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Palmer Dabbelt @ 2023-11-21 23:27 UTC (permalink / raw)
  To: gcc-patches; +Cc: Palmer Dabbelt

I was poking around with this test failure and noticed it was exercising
undefined behavior.  The return type doesn't matter for what's being
tested, so just mark it as void.

gcc/testsuite/ChangeLog:

	* gcc.dg/unroll-8.c: Remove UB.
---
I didn't tes this, but it seems trivial enough that I'm just going to
throw it at the bots and hope I'm right.
---
 gcc/testsuite/gcc.dg/unroll-8.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/gcc.dg/unroll-8.c b/gcc/testsuite/gcc.dg/unroll-8.c
index 4388f47d4c7..06d32e56893 100644
--- a/gcc/testsuite/gcc.dg/unroll-8.c
+++ b/gcc/testsuite/gcc.dg/unroll-8.c
@@ -3,7 +3,7 @@
 /* { dg-additional-options "-fno-tree-vectorize" { target amdgcn-*-* } } */
 
 struct a {int a[7];};
-int t(struct a *a, int n)
+void t(struct a *a, int n)
 {
   int i;
   for (i=0;i<n;i++)
-- 
2.42.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-11-26  4:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-21 23:27 [PATCH 1/2] testsuite/unroll-8: Avoid triggering undefined behavior Palmer Dabbelt
2023-11-21 23:27 ` [PATCH 2/2] testsuite/unroll-8: Disable vectorization for varibale-factor targets Palmer Dabbelt
2023-11-22 22:38   ` Jeff Law
2023-11-26  4:36     ` Andrew Pinski
2023-11-22 22:32 ` [PATCH 1/2] testsuite/unroll-8: Avoid triggering undefined behavior Jeff Law
2023-11-23  0:08 ` Andrew Pinski

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).