From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Zack Marvel Newsgroups: gmane.lisp.guile.bugs Subject: bug#38486: Compiler does not terminate Date: Tue, 3 Dec 2019 21:58:00 -0700 Message-ID: <460c32b1-966a-079d-4187-de63f93c6e5f@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="175575"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 To: 38486@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Wed Dec 04 07:27:35 2019 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1icO8N-000jZf-Bp for guile-bugs@m.gmane.org; Wed, 04 Dec 2019 07:27:35 +0100 Original-Received: from localhost ([::1]:34468 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1icO8J-0006DD-CJ for guile-bugs@m.gmane.org; Wed, 04 Dec 2019 01:27:32 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38672) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1icO2C-0004Xn-Vk for bug-guile@gnu.org; Wed, 04 Dec 2019 01:21:24 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1icO25-0000Sj-SV for bug-guile@gnu.org; Wed, 04 Dec 2019 01:21:08 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35384) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1icO24-0000MZ-Eq for bug-guile@gnu.org; Wed, 04 Dec 2019 01:21:05 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1icO22-0003rV-AO for bug-guile@gnu.org; Wed, 04 Dec 2019 01:21:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Zack Marvel Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Wed, 04 Dec 2019 06:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 38486 X-GNU-PR-Package: guile X-Debbugs-Original-To: bug-guile@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.157544043114791 (code B ref -1); Wed, 04 Dec 2019 06:21:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 4 Dec 2019 06:20:31 +0000 Original-Received: from localhost ([127.0.0.1]:41357 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1icO1X-0003qU-1r for submit@debbugs.gnu.org; Wed, 04 Dec 2019 01:20:31 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:50317) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1icMk8-0001lb-Jg for submit@debbugs.gnu.org; Tue, 03 Dec 2019 23:58:29 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37509) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1icMk3-0000ZE-AJ for bug-guile@gnu.org; Tue, 03 Dec 2019 23:58:25 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1icMjy-0007ZC-5J for bug-guile@gnu.org; Tue, 03 Dec 2019 23:58:20 -0500 Original-Received: from mail-il1-x134.google.com ([2607:f8b0:4864:20::134]:46250) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1icMjq-000732-Mc for bug-guile@gnu.org; Tue, 03 Dec 2019 23:58:13 -0500 Original-Received: by mail-il1-x134.google.com with SMTP id t17so5459454ilm.13 for ; Tue, 03 Dec 2019 20:58:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:from:subject:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=fjwnjglixX4hrBvVXA537wojrIzinCQnTyy5mBa1Ibs=; b=rMDGysb9gOr7yNHbEajFBPsH1pKVYJ6PM9iSOj48fMMxabaBxHeM4hJfr9FL6Zgsz6 Wq8KifzhVnE6Yb6ZxcfrSYaHtxqDCB0sn3H7hwSvIfkPNd/qqrVFsqZMRDddnXXyWw0m oYzkCpwH++x1RQUjqD5mw1B3iapyGcCgoGv1cBpha8olUkWgCIhLOMgYTHdfrMmK/gOE 3gNnXEcLqtrGHmbUSNAhhGe3JIw6GON+IFp3sgz1+ZGOdd8R2bf48+GcwPq9+fGMlu9l gRxtfYDdqLdWsucLPh5zLYxBkp2G+FuESKZROQ2Us5yU0pq6euGQjrivtxQQvgh1iCQu Oovg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-language:content-transfer-encoding; bh=fjwnjglixX4hrBvVXA537wojrIzinCQnTyy5mBa1Ibs=; b=Y70GBYtsONjOY+gyFAX5EIXPKWuECpSpCFKtF+bPF4EnWabShZ9olCxJA5DQd0lR93 pmvTm3QKLIir7dpGMwt6VVYZSD8UyOm4bJbN1laqLmQN0qhNXodi3dH31l50WAl/b1tc 08jEAjyM2sq8B7rNkQuilUwsvUzsvstDj3+ES4xw5yu+TFketFNqg3w5fKBv1c6h7HQv rhlRfkE8A1XTadh4eB4yfMUkf3G/zREJZ5i5p3U3HKxRE+R6G5oka4CT7upTs+8YVyGW L9r7DWAJjP+nppEji8mPOLQ2OnoFvHZKZuVseiGZoCWj/y8fXTkzU5qEsg2GCTzPonup 8LHA== X-Gm-Message-State: APjAAAViNTuAc1d9z6tboHVHg0oK0xrpUVxhmvHpZENJShx1zeFrF1Gg W4oG/hs4NOpdtFdl7aOtAtPpviiR X-Google-Smtp-Source: APXvYqy5wd03AtLAX01b9O2spGmIWVSqmlpmwJSca3IfuGcPvx6BGflnxs8DTq0wObyilJK/azny/Q== X-Received: by 2002:a92:49db:: with SMTP id k88mr1880112ilg.25.1575435482818; Tue, 03 Dec 2019 20:58:02 -0800 (PST) Original-Received: from [192.168.88.156] (c-71-205-221-119.hsd1.co.comcast.net. [71.205.221.119]) by smtp.gmail.com with ESMTPSA id y7sm1449491ill.16.2019.12.03.20.58.01 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 03 Dec 2019 20:58:01 -0800 (PST) Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Mailman-Approved-At: Wed, 04 Dec 2019 01:20:28 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-guile@gnu.org 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" Xref: news.gmane.org gmane.lisp.guile.bugs:9480 Archived-At: Hello, When compiling the following program, the compiler does not terminate. (define (find-closest-intersection board) (let ((cols (vector-length board)) (rows (vector-length (vector-ref board 0)))) (let col-loop ((col 0) (min-distance 999)) (if (< col cols) (col-loop (1+ col) (let row-loop ((row 0) (min-distance min-distance)) (if (< row rows) (row-loop (1+ row) min-distance) min-distance))) min-distance)))) Here is the output of the compiler: $ guile ~/src/advent-of-code/2019/guile_infinite_loop.scm ;;; note: source file /home/zack/src/advent-of-code/2019/guile_infinite_loop.scm ;;; newer than compiled /home/zack/.local/src/guile-2.2.6/cache/guile/ccache/2.2-LE-8-3.A/home/zack/src/advent-of-code/2019/guile_infinite_loop.scm.go ;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0 ;;; or pass the --no-auto-compile argument to disable. ;;; compiling /home/zack/src/advent-of-code/2019/guile_infinite_loop.scm If I flatten the two loops into one, the program compiles. If I use constants instead of vector sizes, it also compiles. I can produce this behavior with Guile 2.2.4 and 2.2.6. I'm running Debian 10 amd64, and I compiled Guile with GCC 8.3.0. Please let me know if I can provide more information! Best regards, Zack Marvel