From unknown Mon Aug 18 14:20:54 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#58217 <58217@debbugs.gnu.org> To: bug#58217 <58217@debbugs.gnu.org> Subject: Status: tree-il->bytecode compilation of (not (list =?UTF-8?Q?=E2=80=A6?=)) fails Reply-To: bug#58217 <58217@debbugs.gnu.org> Date: Mon, 18 Aug 2025 21:20:54 +0000 retitle 58217 tree-il->bytecode compilation of (not (list =E2=80=A6)) fails reassign 58217 guile submitter 58217 Ludovic Court=C3=A8s severity 58217 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 01 06:27:42 2022 Received: (at submit) by debbugs.gnu.org; 1 Oct 2022 10:27:42 +0000 Received: from localhost ([127.0.0.1]:43743 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oeZig-0004G8-7p for submit@debbugs.gnu.org; Sat, 01 Oct 2022 06:27:42 -0400 Received: from lists.gnu.org ([209.51.188.17]:55020) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oeZid-0004Fy-NV for submit@debbugs.gnu.org; Sat, 01 Oct 2022 06:27:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56556) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oeZid-0002ea-1T for bug-guile@gnu.org; Sat, 01 Oct 2022 06:27:39 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:55538) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oeZic-0003qG-Nt for bug-guile@gnu.org; Sat, 01 Oct 2022 06:27:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:Subject:To:From:in-reply-to: references; bh=oufHdobOij4emUpRCxxxUcCZ9hVe+ar+QJV8leTXods=; b=HbB5CxgSjQf37c jqcSUn3NFUTqiE+GozNqs8meNud6x4bg//9DBU0qbxrh1OIAtqcKazfzNzrdriles3samRkRwZ23p zdE+aloDg4VHAzlvOo7LE9UaUrE6E0kW+y++mjMCjekW2boXD8dasc9mFkTo61IoSnpCBOREnOHBz ntOQsIHzdCHq7wrMR/DSk4Q5iU0Rr0TQG4YDmZLuD6kBd0XXDAOssDHubjrInoNe7EPqK9ZvgMWOz EdpX7xSQassBm/scfNBTNQkgwshI+FF5vU36zyfeglhPVStAfJqszHJIWkLShBQ4u725c3xc7V2hs 1nZSC4oTmdxNYSxOgfIg==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:56268 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oeZiX-0000j4-2z for bug-guile@gnu.org; Sat, 01 Oct 2022 06:27:37 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: bug-guile@gnu.org Subject: tree-il->bytecode compilation of (not (list =?utf-8?Q?=E2=80=A6?= =?utf-8?Q?=29=29?= fails X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: =?utf-8?Q?D=C3=A9cadi?= 10 =?utf-8?Q?Vend=C3=A9miair?= =?utf-8?Q?e?= an 231 de la =?utf-8?Q?R=C3=A9volution=2C?= jour de la Cuve X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Sat, 01 Oct 2022 12:27:30 +0200 Message-ID: <87sfk7g7ot.fsf@inria.fr> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi, I stumbled upon this bug of the baseline compiler: --8<---------------cut here---------------start------------->8--- scheme@(guile-user)> (compile '(not (list 1 2)) #:optimization-level 2) $3 =3D #f scheme@(guile-user)> (compile '(not (list 1 2)) #:optimization-level 1) ice-9/boot-9.scm:1685:16: In procedure raise-exception: In procedure struct-vtable: Wrong type argument in position 1 (expecting st= ruct): #f Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue. scheme@(guile-user) [1]> ,bt In system/base/compile.scm: 352:28 5 (compile _ #:from _ #:to _ #:env _ #:optimization-level _ #:wa= rning-level _ #:opts _) 265:44 4 (_ _ _) 261:27 3 (_ _ _) In language/tree-il/compile-bytecode.scm: 1386:14 2 (compile-bytecode # # =E2=80=A6) 412:30 1 (_ _) In ice-9/boot-9.scm: 1685:16 0 (raise-exception _ #:continuable? _) scheme@(guile-user) [1]> (version) $4 =3D "3.0.8" --8<---------------cut here---------------end--------------->8--- The exception is raised in the =E2=80=98predicate?=E2=80=99 call below, whe= re (lookup-primitive 'list) returns #f: (define (finish-conditional exp) (define (true? x) (match x (($ _ val) val) (_ #f))) (define (false? x) (match x (($ _ val) (not val)) (_ #f))) (define (predicate? name) (primitive-predicate? (lookup-primitive name)= )) (match exp (($ src ($ _ test (? true?) (? false?)) consequent alternate) (finish-conditional (make-conditional src test consequent alternate)= )) (($ src ($ _ test (? false?) (? true?)) consequent alternate) (finish-conditional (make-conditional src test alternate consequent)= )) (($ src ($ _ (? predicate?))) exp) (($ src test consequent alternate) (make-conditional src (make-primcall src 'false? (list test)) alternate consequent)))) I believe this is fixed by changing =E2=80=98predicate?=E2=80=99 to: (define (predicate? name) (and=3D> (lookup-primitive name) primitive-predicate?)) Thoughts? Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 01 10:02:48 2022 Received: (at 58217-done) by debbugs.gnu.org; 1 Oct 2022 14:02:48 +0000 Received: from localhost ([127.0.0.1]:45450 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oed4p-0006V1-PC for submit@debbugs.gnu.org; Sat, 01 Oct 2022 10:02:47 -0400 Received: from eggs.gnu.org ([209.51.188.92]:34110) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oed4n-0006Uo-VW for 58217-done@debbugs.gnu.org; Sat, 01 Oct 2022 10:02:46 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:41142) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oed4i-0003BP-PC for 58217-done@debbugs.gnu.org; Sat, 01 Oct 2022 10:02:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=60WkvLmEq2p8LvEWVQgoPx9y6Ym3ItkSPjJT2UNi+rQ=; b=LE06wd2o01Eb51PEgfPs 4osvEVIa4+UBDgPIp02q5vNj5GrVLphg8dD6diFKTJ4/hKFEuozhnONcZfWvve8i4CQddGItRTIC4 nGQiewMck9Ibgo3+85oUOhR/w/eIAvorHrW/7bXXp/0UM7JoYNwMS62IwfHSydWr9fFVhyaAwWqQP 0Fi/hIVfoEJS4QGLAfBB6cOEBJmfW2M1S1jW8mHjdXLY+J8JQa/1oIKgp/zdr7+zmhDUG3lDgSnYu alfVl9fYk1CIjY/DmULf839wELN5o9yGJsDwVzmRxAr6rVGIJimkJERCs3tFtOXYuS0tx9uYv+8uT OJWiPEGn0aMTpQ==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:54426 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oed4i-0006B8-3V for 58217-done@debbugs.gnu.org; Sat, 01 Oct 2022 10:02:40 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: 58217-done@debbugs.gnu.org Subject: Re: bug#58217: tree-il->bytecode compilation of (not (list =?utf-8?Q?=E2=80=A6=29=29?= fails References: <87sfk7g7ot.fsf@inria.fr> Date: Sat, 01 Oct 2022 16:02:37 +0200 In-Reply-To: <87sfk7g7ot.fsf@inria.fr> ("Ludovic =?utf-8?Q?Court=C3=A8s=22?= =?utf-8?Q?'s?= message of "Sat, 01 Oct 2022 12:27:30 +0200") Message-ID: <87wn9jej5u.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 58217-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Ludovic Court=C3=A8s skribis: > I believe this is fixed by changing =E2=80=98predicate?=E2=80=99 to: > > (define (predicate? name) > (and=3D> (lookup-primitive name) primitive-predicate?)) Done in e2797f529b8934b0a11b9f6aebbf937b183ece77! Ludo=E2=80=99. From unknown Mon Aug 18 14:20:54 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 30 Oct 2022 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator