Subject: 26.0.50; (cl-typep instance-ab 'class-a) gives wrong answer when compiled

From: [email-masked]
Date: Sat, 15 Jul 2017 17:50:32 -0400

~/src/emacs$ .../emacs -Q -batch -f batch-byte-compile cl-typep-subclass.el
    ~/src/emacs$ .../emacs -Q -batch -l cl-typep-subclass.el
    (cl-typep eitest-ab ’class-a) => t
    ~/src/emacs$ .../emacs -Q -batch -l cl-typep-subclass.elc
    (cl-typep eitest-ab ’class-a) => nil

Where cl-typep-subclass.el is

(require 'eieio)
(require 'eieio-base)
(require 'eieio-opt)

(eval-when-compile (require 'cl-lib))

(defclass class-a ()
  ()
  "Class A")

(defclass class-b ()
  ()
  "Class B")

(defclass class-ab (class-a class-b)
  ()
  "Class A and B combined.")

(defvar eitest-ab nil)
(setq eitest-ab (class-ab))

(message "(cl-typep eitest-ab 'class-a) => %S" (cl-typep eitest-ab 'class-a))

This test case is a reduction from
test/lisp/emacs-lisp/eieio-tests/eieio-tests.el.  You can see that tests
23 and 24 will fail when you do 'make eieio-tests TEST_LOAD_EL=no'.

In GNU Emacs 26.0.50 (build 64, x86_64-unknown-linux-gnu, X toolkit, Xaw scroll bars)
 of 2017-07-15 built on zony
Repository revision: b30ee0c9225bad6e3fd0b511a6c5d9a64b8fd66a
Windowing system distributor 'The X.Org Foundation', version 11.0.11901000
Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.

Configured using:
 'configure --cache-file=../debug-config.cache 'CFLAGS=-O0 -g3
 -march=native' --enable-checking=yes,glyphs
 --enable-check-lisp-object-type MAKEINFO=makeinfo-4.13a
 --with-x-toolkit=lucid --with-toolkit-scroll-bars --with-gif=no
 --with-jpeg=no'

Configured features:
XPM TIFF PNG RSVG SOUND GPM DBUS GSETTINGS NOTIFY ACL GNUTLS LIBXML2
FREETYPE XFT ZLIB TOOLKIT_SCROLL_BARS LUCID X11 LIBSYSTEMD