From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1844 invoked by alias); 29 Apr 2011 01:01:16 -0000 Received: (qmail 1787 invoked by uid 22791); 29 Apr 2011 01:01:15 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,TW_SV 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; Fri, 29 Apr 2011 01:00:58 +0000 From: "arthur.j.odwyer at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/48813] New: Segfault with backward branch inside dead loop body 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: arthur.j.odwyer at gmail 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" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Date: Fri, 29 Apr 2011 01:01: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: 2011-04/txt/msg03052.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D48813 Summary: Segfault with backward branch inside dead loop body Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassigned@gcc.gnu.org ReportedBy: arthur.j.odwyer@gmail.com Created attachment 24135 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=3D24135 Output of "gcc -Os -funroll-loops -c test227972954.c -v" with gcc 4.4.5 This reproduces for me with svn revision 172950 (2011-04-25), and also with= gcc 4.4.5, but strangely not with gcc 4.5.1. I'm on Ubuntu 10.10, x86-64. cat >test227972954.c <header->index); (gdb) backtrace #0 0x00000000005aa45c in fix_bb_placements (from=3D0x7ffff6df0820,=20 irred_invalidated=3D0x7fffffffddfe "") at ../../gcc/cfgloopmanip.c:199 #1 0x00000000005aab22 in fix_loop_placements (e=3D) at ../../gcc/cfgloopmanip.c:858 #2 remove_path (e=3D) at ../../gcc/cfgloopmanip.c:388 #3 0x0000000000745fc6 in peel_loop_completely (flags=3D6) at ../../gcc/loop-unroll.c:514 #4 peel_loops_completely (flags=3D6) at ../../gcc/loop-unroll.c:256 #5 unroll_and_peel_loops (flags=3D6) at ../../gcc/loop-unroll.c:165 [...] This test case is reduced from the output of Csmith (http://embed.cs.utah.edu/csmith/), using the following command line: csmith --bitfields --packed-struct -s 227972954 > test227972954.c