From owner-freebsd-current@FreeBSD.ORG Sun Jun 28 13:56:28 2009 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D4F021065674 for ; Sun, 28 Jun 2009 13:56:28 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id 9CA9A8FC12 for ; Sun, 28 Jun 2009 13:56:28 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (unknown [192.168.64.3]) by phk.freebsd.dk (Postfix) with ESMTP id 7480069959 for ; Sun, 28 Jun 2009 13:37:33 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.14.3/8.14.3) with ESMTP id n5SDbWg5004294 for ; Sun, 28 Jun 2009 13:37:33 GMT (envelope-from phk@critter.freebsd.dk) To: current@freebsd.org From: Poul-Henning Kamp Date: Sun, 28 Jun 2009 13:37:32 +0000 Message-ID: <4293.1246196252@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Cc: Subject: GCC inline bug on -current X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jun 2009 13:56:29 -0000 While hacking up some code on "8.0-CURRENT #0 r195095M: Sat Jun 27 12:24:33 UTC 2009", I have run into a GCC bug with inlining: Download the three files in this directory: http://phk.freebsd.dk/misc/P Run "make test" The #if in line 183 controls if the function FindLoops() is inlined. If it is not inlined, the program runs to completion with the message 347 loops If it is inlined, the program enters an infinite loop. Enjoy... -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.