From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29387 invoked by alias); 25 Feb 2013 21:11:25 -0000 Received: (qmail 28646 invoked by uid 48); 25 Feb 2013 21:10:28 -0000 From: "dhazeghi at yahoo dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/56448] New: cc1 hangs on volatile array with -O or above Date: Mon, 25 Feb 2013 21:11:00 -0000 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: normal X-Bugzilla-Who: dhazeghi at yahoo dot com 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 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: 2013-02/txt/msg02404.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56448 Bug #: 56448 Summary: cc1 hangs on volatile array with -O or above Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassigned@gcc.gnu.org ReportedBy: dhazeghi@yahoo.com The following snippet (reduced from a larger test case) causes top-of-trunk cc1 to hang (infinite loop) on x86_64-linux using -O or above. This is a regression from 4.7.2 which does not have this issue. $ cat volatile.c volatile int a[1]; int b; void fn1 () { for (;;) { int *c[3][6] = { 0, 0, 0, &b, 0, 0, 0, 0, &b, 0, 0, 0, 0, 0, 0, 0, &b, (int *)&a[0] }; b = *c[2][5]; } } $ gcc-trunk --version gcc-trunk (GCC) 4.8.0 20130225 (experimental) [trunk revision 196255] $ gcc-4.7 -O -c volatile.c $ gcc-trunk -c volatile.c $ gcc-trunk -O -c volatile.c