From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11185 invoked by alias); 15 May 2007 23:14:55 -0000 Received: (qmail 11160 invoked by uid 48); 15 May 2007 23:14:44 -0000 Date: Tue, 15 May 2007 23:14:00 -0000 Subject: [Bug c/31944] New: Endless loop while building a 64-bit 2.6.20 kernel X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "aurelien at aurel32 dot net" 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: 2007-05/txt/msg01156.txt.bz2 The file fs/ocfs2/dlm/dlmmaster.c from the 2.6.20 kernel triggers an endless loop in gcc 4.1 built for the hppa64-linux-gnu target. It occurs at -O2, but not at -O1 or -O0. Also specifying -fno-cse-follow-jumps workaround the problem. Thanks to Randolph Chung we have a reduced testcase: struct bug { int type; }; static void stuck(struct bug *mle, void *res) { if (mle->type == 1) { if (res == 0) asm volatile("nop"); } else if (mle->type == 0) { if (res == 0) { asm volatile("nop" : : "i" (0)); } } } void foo(void) { stuck(0, 0); } void bar(void) { stuck(0, 0); } And some infos about the compiler used: Using built-in specs. Target: hppa64-linux-gnu Configured with: ../src/configure --enable-languages=c --prefix=/usr --libexecdir=/usr/lib --disable-shared --disable-nls --disable-threads --disable-libffi --disable-libgomp --disable-libmudflap --disable-libssp --with-as=/usr/bin/hppa64-linux-gnu-as --with-ld=/usr/bin/hppa64-linux-gnu-ld --includedir=/usr/hppa64-linux-gnu/include --host=hppa-linux-gnu --build=hppa-linux-gnu --target=hppa64-linux-gnu Thread model: single gcc version 4.1.3 20070429 (prerelease) (Debian 4.1.2-6) -- Summary: Endless loop while building a 64-bit 2.6.20 kernel Product: gcc Version: 4.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: aurelien at aurel32 dot net GCC build triplet: hppa1.1-linux-gnu GCC host triplet: hppa1.1-linux-gnu GCC target triplet: hppa64-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31944