-#-(or alpha 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)))
+ (dolist (frame '(#-x86 "undefined function" ; bug 353
+ "FLET COMMON-LISP-USER::TEST"))
+ (assert (verify-backtrace (lambda () (test #'optimized)) frame
+ :test #'equal
+ :allow-bogus-frames (or #+x86 t))))
+ (dolist (frame '(#-x86 "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 #+x86 t)))))