GNU bug report logs - #75216
Miscompilation of code with numeric predicates

Previous Next

Package: guile;

Reported by: "Thompson, David" <dthompson2 <at> worcester.edu>

Date: Tue, 31 Dec 2024 00:18:02 UTC

Severity: normal

Full log


View this message in rfc822 format

From: Ludovic Courtès <ludo <at> gnu.org>
To: "Thompson, David" <dthompson2 <at> worcester.edu>
Cc: 75216 <at> debbugs.gnu.org
Subject: bug#75216: Miscompilation of code with numeric predicates
Date: Fri, 28 Feb 2025 21:22:05 +0100
"Thompson, David" <dthompson2 <at> worcester.edu> skribis:

> Consider this contrived procedure:
>
> (define (foo x)
>   (cond
>    ((integer? x) 42)
>    ((and (number? x) (inexact? x)) 69)
>    (else 138)))
>
> This procedure is kind of silly but it resembles some real world code
> I was debugging today.  A call of (foo 8.2) should return 69 and
> indeed it does so on Guile 3.0.9. Not so on Guile 3.0.10 where it
> returns 138.

Bug confirmed on c8a169d38825d5a21da5392b355ca5fc9f33fa55 (post 3.0.10).

Ludo’.




This bug report was last modified 104 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.