From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16458 invoked by alias); 1 Nov 2013 05:25:54 -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 Received: (qmail 16426 invoked by uid 48); 1 Nov 2013 05:25:49 -0000 From: "su at cs dot ucdavis.edu" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/58957] New: compilation hangs at -O3 on x86_64-linux-gnu (both 32-bit and 64-bit modes) Date: Fri, 01 Nov 2013 05:25: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-Version: 4.8.2 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: su at cs dot ucdavis.edu X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-11/txt/msg00009.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58957 Bug ID: 58957 Summary: compilation hangs at -O3 on x86_64-linux-gnu (both 32-bit and 64-bit modes) Product: gcc Version: 4.8.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: su at cs dot ucdavis.edu The following code causes gcc 4.8.2 (as well as gcc 4.8.0 and gcc 4.8.1) to hang at -O3 on x86_64-linux-gnu in both 32-bit and 64-bit modes. It doesn't affect gcc trunk, 4.7.x, and 4.6.x. $ gcc-trunk -O3 small.c $ gcc-4.6 -O3 small.c $ gcc-4.7 -O3 small.c $ $ gcc-4.8 -O3 small.c ^C $ $ gcc-4.8 -v Using built-in specs. COLLECT_GCC=gcc-4.8 COLLECT_LTO_WRAPPER=/usr/local/gcc-4.8.2/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.8.2/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: ../gcc-4.8.2/configure --enable-languages=c,c++,objc,obj-c++,fortran,lto --enable-checking=release --with-gmp=/home/su/software/local/gcc-4.8.2 --with-mpfr=/home/su/software/local/gcc-4.8.2 --with-mpc=/home/su/software/local/gcc-4.8.2 --with-cloog=/home/su/software/local/gcc-4.8.2 --prefix=/home/su/software/local/gcc-4.8.2 Thread model: posix gcc version 4.8.2 (GCC) $ ---------------------------------- void __assert_fail () __attribute__ ((__noreturn__)); int a[10], b, c, d, *e, **f = &e, g, i, *j; unsigned int h; int * foo () { for (c = 0; c < 10; c++) for (i = 1; i >= 0; i--) for (d = 0; d < 10; d++) { j = &a[d]; j >= &a[0] && j <= &a[9] ? (void) 0 : __assert_fail (); } return &b; } int main () { for (g = 3; g < 10; g++) for (; h < 10; h++) *f = foo (); return 0; }