public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jsm28 at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/36493]  New: [4.3/4.4 Regression] vectorizer aliasing bug
Date: Tue, 10 Jun 2008 20:06:00 -0000	[thread overview]
Message-ID: <bug-36493-230@http.gcc.gnu.org/bugzilla/> (raw)

The following code aborts if built for i686-pc-linux-gnu with -msse2 -O3.

extern void abort (void);
int
main (void)
{
  int i;
  long x[12] __attribute__((aligned(16)));
  x[0] = 1;
  for (i = 0; i < 12; i++)
    x[i] = i;
  if (x[0] != 0)
    abort ();
  return 0;
}

The loop gets vectorized using "vector int *" pointers, and then the compiler
decides that "vector int" writes don't conflict with "long" reads.  (If an
array of int is used instead, the test passes.)

(Not x86-specific; originally observed as a failure of
gcc.c-torture/execute/loop-13.c on SPE with an unsubmitted patch to support
autovectorization there.)


-- 
           Summary: [4.3/4.4 Regression] vectorizer aliasing bug
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jsm28 at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36493


             reply	other threads:[~2008-06-10 20:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-10 20:06 jsm28 at gcc dot gnu dot org [this message]
2008-06-11  8:01 ` [Bug tree-optimization/36493] " irar at il dot ibm dot com
2008-06-11  8:37 ` rguenth at gcc dot gnu dot org
2008-06-11 11:16 ` jsm28 at gcc dot gnu dot org
2008-06-13 21:45 ` mmitchel at gcc dot gnu dot org
2008-06-16 10:40 ` irar at gcc dot gnu dot org
2008-06-16 10:44 ` irar at gcc dot gnu dot org
2008-06-17 11:50 ` irar at il dot ibm dot com
2008-12-28  1:17 ` pinskia at gcc dot gnu dot org

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=bug-36493-230@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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).