From ba94bcafea44e4bfd400f908e3de88617cd01f4a Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Tue, 11 Jun 2019 12:56:23 +0200 Subject: [PATCH] Fix intmap-intersect edge case * module/language/cps/intmap.scm (intmap-intersect): If intersection of same-level intmaps is empty, return empty intmap. --- module/language/cps/intmap.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module/language/cps/intmap.scm b/module/language/cps/intmap.scm index 8995d6211..4ac5d7620 100644 --- a/module/language/cps/intmap.scm +++ b/module/language/cps/intmap.scm @@ -1,5 +1,5 @@ ;;; Functional name maps -;;; Copyright (C) 2014, 2015, 2017 Free Software Foundation, Inc. +;;; Copyright (C) 2014-2017,2019 Free Software Foundation, Inc. ;;; ;;; This library is free software: you can redistribute it and/or modify ;;; it under the terms of the GNU Lesser General Public License as @@ -717,6 +717,7 @@ already, and always calls the meet procedure." ;; At this point, A and B cover the same range. (let ((root (intersect a-shift a-root b-root))) (cond + ((absent? root) empty-intmap) ((eq? root a-root) a) ((eq? root b-root) b) (else (make-intmap/prune a-min a-shift root)))))))))