From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20108 invoked by alias); 23 Sep 2010 22:03:26 -0000 Received: (qmail 20005 invoked by uid 22791); 23 Sep 2010 22:03:24 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 23 Sep 2010 22:03:18 +0000 From: "wouter.vermaelen at scarlet dot be" To: gcc-bugs@gcc.gnu.org Subject: [Bug 45764] (tree-optimization) New: wrong code -O2 vs -O3 (problem in vectorizer???) X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Keywords: X-Bugzilla-Severity: major X-Bugzilla-Who: wouter.vermaelen at scarlet dot be X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Thu, 23 Sep 2010 22:03:00 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-09/txt/msg02630.txt.bz2 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.