From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.bugs Subject: Re: guile-2.0.0 fails to build without threads Date: Mon, 20 Jun 2011 10:06:37 +0200 Message-ID: <87sjr5lyeq.fsf@pobox.com> References: <4D9DCE98.5080808@gentoo.org> <87y63gj765.fsf@rapitore.luna> <87aafusesz.fsf@rapitore.luna> <874o62s7hu.fsf@rapitore.luna> <87y63eqmp3.fsf@rapitore.luna> <87hb9d4o8n.fsf@rapitore.luna> <87oc2xdxkv.fsf@rapitore.luna> <87ipt4f9fu.fsf@rapitore.luna> <878vt092m3.fsf@pobox.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1308557627 18910 80.91.229.12 (20 Jun 2011 08:13:47 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 20 Jun 2011 08:13:47 +0000 (UTC) Cc: bug-guile@gnu.org To: Marco Maggi Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Mon Jun 20 10:13:43 2011 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QYZc7-0006mT-C2 for guile-bugs@m.gmane.org; Mon, 20 Jun 2011 10:13:43 +0200 Original-Received: from localhost ([::1]:52887 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QYZc6-0008Hy-5a for guile-bugs@m.gmane.org; Mon, 20 Jun 2011 04:13:42 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:41165) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QYZVM-0006tP-KV for bug-guile@gnu.org; Mon, 20 Jun 2011 04:06:45 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QYZVK-0005Q4-CJ for bug-guile@gnu.org; Mon, 20 Jun 2011 04:06:44 -0400 Original-Received: from a-pb-sasl-sd.pobox.com ([64.74.157.62]:64124 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QYZVK-0005Pz-0m for bug-guile@gnu.org; Mon, 20 Jun 2011 04:06:42 -0400 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 363A43455; Mon, 20 Jun 2011 04:08:53 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=xeI+7GgT6KWp+6x5ZjcfK6FGxTc=; b=nKx7My jr1SmcUNagACpL0dbVbdkK2Sf2pcmNgn3cXBTorytVE8dHQ9MH50uekTRGBRf5x7 hkP2P5rjCNu8zEiAaZ8wNDkS+6a7B94WhW+Ek4sTS4Oslvq2g8WffmQJ+5Bs2+da uDP5H6LozaNzIlRIoJwZWq3u3Kr6bEFjryXQk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=uBNjzB4xSXG7jooMMTgCU2fLWXmALBKz nTJlsr71vhp9PGVEHUiTXb2nfSXnBl2GFohzIrukPgauy0sZHcqCLzSYBQdLk9RX mKpog/dCs16ryw6gdSxFR3myZhfTmZM1ID3zad6GvCnThY7CO+TjMmDIbEVMV9Hj METMjYFwuVg= Original-Received: from a-pb-sasl-sd.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 2DA283454; Mon, 20 Jun 2011 04:08:53 -0400 (EDT) Original-Received: from badger (unknown [90.164.198.39]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTPSA id 50C173453; Mon, 20 Jun 2011 04:08:52 -0400 (EDT) In-Reply-To: <878vt092m3.fsf@pobox.com> (Andy Wingo's message of "Fri, 17 Jun 2011 12:25:08 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) X-Pobox-Relay-ID: 89353F3E-9B14-11E0-940C-5875C023C68D-02397024!a-pb-sasl-sd.pobox.com X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 64.74.157.62 X-BeenThere: bug-guile@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:5678 Archived-At: On Fri 17 Jun 2011 12:25, Andy Wingo writes: > On Sat 21 May 2011 15:51, Marco Maggi writes: > >> Andy Wingo wrote: >>> Thanks. You seem to be running on system in which the >>> stack grows up. Is that the case? Check >>> libguile/scmconfig.h and config.log. >> >> Yes, I have: >> >> #define SCM_STACK_GROWS_UP 1 /* 0 or 1 */ >> >> maybe the problem is that GCC 4.6.0 with -O3 optimises the >> program in such a way that the test is invalidated. > > This bug is also present in Autoconf, where this test comes from > originally. I have reported it there. I have no idea what kind of test > can defeat such an omniscient inliner. Fixed in git, for the time being. It's an arms race with the compiler, and clearly code clarity is losing: int find_stack_direction (int *addr, int depth) { int dir, dummy = 0; if (! addr) addr = &dummy; *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; dir = depth ? find_stack_direction (addr, depth - 1) : 0; return dir + dummy; } int main (int argc, char **argv) { return find_stack_direction (0, argc + !argv + 20) < 0; } See http://lists.gnu.org/archive/html/bug-autoconf/2011-06/msg00032.html. Andy -- http://wingolog.org/