-#-x86 ; bug 345
-(progn
- (flet ((test-function ()
- (declare (optimize (speed 2) (debug 1))) ; tail call elimination
- (#:undefined-function 42)))
- (assert (verify-backtrace #'test-function "undefined function"
- :test #'equal)))
-
- (flet ((test-function ()
- (declare (optimize (speed 1) (debug 2))) ; no tail call elimination
- (#:undefined-function 42)))
- (assert (verify-backtrace #'test-function "undefined function"
- :test #'equal))))
+#-(or alpha) ; bug 346
+(flet ((optimized ()
+ (declare (optimize (speed 2) (debug 1))) ; tail call elimination
+ (#:undefined-function 42))
+ (not-optimized ()
+ (declare (optimize (speed 1) (debug 2))) ; no tail call elimination
+ (#:undefined-function 42))
+ (test (fun)
+ (declare (optimize (speed 1) (debug 2))) ; no tail call elimination
+ (funcall fun)))
+ #-x86 ; <- known bug (?): fails for me on 0.8.17.31/Linux/x86 -- WHN 2004-12-27
+ (dolist (frame '(#-(or x86 x86-64) "undefined function" ; bug 353
+ "FLET COMMON-LISP-USER::TEST"))
+ (assert (verify-backtrace (lambda () (test #'optimized)) frame
+ :test #'equal
+ :allow-bogus-frames (or #+(or x86 x86-64) t))))
+ (dolist (frame '(#-(or x86 x86-64) "undefined function" ; bug 353
+ "FLET COMMON-LISP-USER::NOT-OPTIMIZED"
+ "FLET COMMON-LISP-USER::TEST"))
+ (assert (verify-backtrace (lambda () (test #'not-optimized)) frame
+ :test #'equal
+ :allow-bogus-frames (or #+(or x86 x86-64) t)))))