Opened 7 months ago

#1470 new task

Should -analyze-only imply -specialize?

Reported by: megane Owned by:
Priority: minor Milestone: 5.1
Component: compiler Version: 4.13.0
Keywords: Cc:
Estimated difficulty: trivial

Description

This is snippet is lifted from scrutiny-test.scm, which is checked with -analyze-only. -analyze-only without -specialize gives wrong type for the list.

Either -A should include -specialize, or scrutiny-test.scm should be checked with -specialize.

(let ((l1 (list 'a 'b 'c)))
  (define (list-ref-nowarn1) (list-ref l1 0))
  (compiler-typecase l1 ((not *) 1)))

;; $ csc -analyze-only t.scm
;; 
;; Error: at toplevel:
;;   (t.scm:4) no clause applies in `compiler-typecase' for expression of type `(or pair null)':
;;     (not *)

;; $ csc -analyze-only -specialize t.scm
;; 
;; Error: at toplevel:
;;   (t.scm:4) no clause applies in `compiler-typecase' for expression of type `(list symbol symbol symbol)':
;;     (not *)



Change History (0)

Note: See TracTickets for help on using tickets.