public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug 45764] (tree-optimization) New: wrong code  -O2 vs -O3    (problem in vectorizer???)
@ 2010-09-23 22:03 wouter.vermaelen at scarlet dot be
  2010-09-23 22:20 ` [Bug 45764] (tree-optimization) " pinskia at gcc dot gnu.org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: wouter.vermaelen at scarlet dot be @ 2010-09-23 22:03 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: wrong code  -O2 vs -O3    (problem in vectorizer???)
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: wouter.vermaelen@scarlet.be


> cat bug.cc
int result[64][16];

int main()
{
        double dbuf[1000] = {0.0};
        int ibuf[900];

        double d1 = 0.0;
        double d2 = 0.0;
        for (int i = 0; i < 900; ++i) {
                ibuf[i] = int(d2 - d1);
                d1 += dbuf[i];
                d2 += dbuf[i + 64];
        }

        for (int i = 0; i < 64; ++i) {
                for (int j = 0; j < 8; ++j) {
                        result[i][     j] = ibuf[64 - i + 64 * j];
                        result[i][15 - j] = ibuf[     i + 64 * j];
                }
        }
}

> g++ -O2 bug.cc
> ./a.out
> g++ -O3 bug.cc
> ./a.out
Segmentation fault (core dumped)

I'm using SVN revision 164570 on linux_x86_64.

-- 
Configure bugmail: http://gcc.gnu.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

end of thread, other threads:[~2010-10-21 11:11 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-23 22:03 [Bug 45764] (tree-optimization) New: wrong code -O2 vs -O3 (problem in vectorizer???) wouter.vermaelen at scarlet dot be
2010-09-23 22:20 ` [Bug 45764] (tree-optimization) " pinskia at gcc dot gnu.org
2010-09-24  4:49 ` hjl.tools at gmail dot com
2010-09-24 14:06 ` [Bug tree-optimization/45764] [4.6 Regression] " matz at gcc dot gnu.org
2010-09-24 14:37 ` rguenth at gcc dot gnu.org
2010-09-24 16:14 ` matz at gcc dot gnu.org
2010-09-30 11:05 ` rguenth at gcc dot gnu.org
2010-10-14 10:19 ` rguenth at gcc dot gnu.org
2010-10-14 11:55 ` rguenth at gcc dot gnu.org
2010-10-21 10:01 ` rguenth at gcc dot gnu.org
2010-10-21 11:11 ` rguenth at gcc dot gnu.org
2010-10-21 11:11 ` rguenth at gcc dot gnu.org

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