Subject: bug#16535: Optimization bug?

From: Fabrice Popineau <[email-masked]>
Date: Fri, 24 Jan 2014 17:28:53 +0100

I forgot to add that the previous report happens when compiling with '-O2
-g' or with '-O3 -g'.

If I use '-O0 -g' and no patch, then I get :

Test bool-vector-count-population-1-nil backtrace:
  (if (unwind-protect (setq value-67354 (apply fn-67352 args-67353)) (
  (let (form-description-67356) (if (unwind-protect (setq value-67354
  (let ((value-67354 (quote ert-form-evaluation-aborted-67355))) (let
  (let ((fn-67352 (function eql)) (args-67353 (list (bool-vector-count
  (let* ((bv (make-bool-vector 45 nil))) (aset bv 40 t) (aset bv 0 t)
  (lambda nil (let* ((bv (make-bool-vector 45 nil))) (aset bv 40 t) (a
  #[0 "\306\307!r\211q\210\310\311\312\313\314\315!\316\"\317\320%DC
  funcall(#[0 "\306\307!r\211q\210\310\311\312\313\314\315!\316\"\31
  ert--run-test-internal([cl-struct-ert--test-execution-info [cl-struc
  #[0 "r\304 q\210\305 )\306\307\310\311\312\313!\314\"\315\316%DC\2
  funcall(#[0 "r\304 q\210\305 )\306\307\310\311\312\313!\314\"\315\
  ert-run-test([cl-struct-ert-test bool-vector-count-population-1-nil
  ert-run-or-rerun-test([cl-struct-ert--stats t [[cl-struct-ert-test a
  ert-run-tests(t #[385 "\306\307\"\203D\211\211G\310U\203\211@\20
  ert-run-tests-batch(nil)
  ert-run-tests-batch-and-exit()
  command-line-1(("-L" ";." "-l" "./add-log-tests.el" "-l" "./advice-t
  command-line()
  normal-top-level()

Which is not good either.

Fabrice