public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] testsuite: Fix array size in gcc.dg/strlenopt-66.c
@ 2019-11-21 17:27 Dimitar Dimitrov
  2019-11-21 18:22 ` Martin Sebor
  0 siblings, 1 reply; 4+ messages in thread
From: Dimitar Dimitrov @ 2019-11-21 17:27 UTC (permalink / raw)
  To: gcc-patches; +Cc: Dimitar Dimitrov

One of the passed arguments is actually a string with size 4 ("123").
Adjust the destination buffer accordingly.

gcc/testsuite/ChangeLog:

2019-11-21  Dimitar Dimitrov  <dimitar@dinux.eu>

	* gcc.dg/strlenopt-66.c (test_strncmp_a4_cond_a5_a3_n): Fix array size.

Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu>
---
 gcc/testsuite/gcc.dg/strlenopt-66.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/gcc.dg/strlenopt-66.c b/gcc/testsuite/gcc.dg/strlenopt-66.c
index 4ba31a845b0..3de22c18f4f 100644
--- a/gcc/testsuite/gcc.dg/strlenopt-66.c
+++ b/gcc/testsuite/gcc.dg/strlenopt-66.c
@@ -88,7 +88,7 @@ __attribute__ ((noclone, noinline, noipa)) void
 test_strncmp_a4_cond_a5_a3_n (const char *s1, const char *s2, const char *s3,
 			      int i, unsigned n)
 {
-  char a3[3], a4[4], a5[5];
+  char a3[4], a4[4], a5[5];
   strcpy (a3, s1);
   strcpy (a4, s2);
   strcpy (a5, s3);
-- 
2.20.1

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

end of thread, other threads:[~2019-11-22  0:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-21 17:27 [PATCH] testsuite: Fix array size in gcc.dg/strlenopt-66.c Dimitar Dimitrov
2019-11-21 18:22 ` Martin Sebor
2019-11-21 22:09   ` Dimitar Dimitrov
2019-11-22  0:57     ` Martin Sebor

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