Opened 6 years ago

Closed 4 years ago

#1470 closed task (fixed)

Should -analyze-only imply -specialize?

Reported by: megane Owned by:
Priority: minor Milestone: 5.2
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 (2)

comment:1 Changed 5 years ago by sjamaan

Milestone: 5.15.2

Getting ready for 5.1, moving tickets which won't make it in to 5.2.

comment:2 Changed 4 years ago by megane

Resolution: fixed
Status: newclosed

The test was fixed by 36eeb40db8c4b86b557bd28c8c6849f428ddd189.

Adding -specialize to -analyze-only would make it impossible to
get analyzation without specializations, because we don't have
-no-specialize. So let's forget this for now.

Note: See TracTickets for help on using tickets.