Opened 5 years ago

Last modified 5 years ago

#1630 closed defect

Optimizer may incorrectly drop procedure arguments — at Version 1

Reported by: sjamaan Owned by:
Priority: major Milestone: 5.2
Component: compiler Version: 5.1.0
Keywords: Cc:
Estimated difficulty: hard

Description (last modified by sjamaan)

Found by megane while looking into a patch of mine to improve variable replacements:

(define (foo bindings)                                                                            
  (define (append-map proc lst1)                                                                                                        
    (if lst1                                                                                                                            
        (proc 1)                                                                                                                        
        (proc 1 2)))                                                                                                                    
  (append-map (lambda (b a) (begin)) bindings))

Compile this with -O3 and it will error out with this message:

Error: Arguments to inlined call of `a150' do not match parameter-list (b a)

After fixing this, we can remove the (not captured) test in the 'replaceable code.

Change History (1)

comment:1 Changed 5 years ago by sjamaan

Description: modified (diff)
Note: See TracTickets for help on using tickets.