public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Haochen Jiang <jianghc@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r13-8652] i386: Fix array index overflow in pr105354-2.c
Date: Fri, 26 Apr 2024 09:05:51 +0000 (GMT)	[thread overview]
Message-ID: <20240426090551.33534384AB52@sourceware.org> (raw)

https://gcc.gnu.org/g:7425436b5382a04f3eb28c7c7912f4d9a1cad0bd

commit r13-8652-g7425436b5382a04f3eb28c7c7912f4d9a1cad0bd
Author: Haochen Jiang <haochen.jiang@intel.com>
Date:   Fri Apr 26 16:48:29 2024 +0800

    i386: Fix array index overflow in pr105354-2.c
    
    The array index should not be over 8 for v8hi, or it will fail
    under -O0 or using -fstack-protector.
    
    gcc/testsuite/ChangeLog:
    
            PR target/110621
            * gcc.target/i386/pr105354-2.c: As mentioned.

Diff:
---
 gcc/testsuite/gcc.target/i386/pr105354-2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/gcc.target/i386/pr105354-2.c b/gcc/testsuite/gcc.target/i386/pr105354-2.c
index b78b62e1e7e..1c592e84860 100644
--- a/gcc/testsuite/gcc.target/i386/pr105354-2.c
+++ b/gcc/testsuite/gcc.target/i386/pr105354-2.c
@@ -17,7 +17,7 @@ sse2_test (void)
       b.a[i] = i + 16;
       res_ab.a[i] = 0;
       exp_ab.a[i] = -1;
-      if (i <= 8)
+      if (i < 8)
 	{
 	  c.a[i] = i;
 	  d.a[i] = i + 8;

                 reply	other threads:[~2024-04-26  9:05 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20240426090551.33534384AB52@sourceware.org \
    --to=jianghc@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /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).