all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Rafael D Sorkin <rsorkin@perimeterinstitute.ca>
To: 20427@debbugs.gnu.org
Subject: bug#20427: bug in optimizing compiler?
Date: Sun, 26 Apr 2015 00:15:51 -0400	[thread overview]
Message-ID: <E1YmDyx-0003q2-LQ@mars.pi.local> (raw)

The following report refers to this version of emacs: 

  GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.10.7) of
  2014-03-07 on lamiak, modified by Debian

Hello,

When I byte-compile a file containing the following code, with
optimization safety=0, the compiler deletes the assertion test.

  (defmacro buggy ()
    (assert nil nil "assertion failed -- it always should fail")
    "This should never show up!")

This only seems to happen when i compile a file containing the
macro, not when i compile the macro individually.
Here is a full example 
(the defmacro of `buggy' is in the file "bug.test.el")

  (declaim (optimize  (safety 3)))
  (byte-compile-file "bug.test.el" 'load)	; t
  (buggy)					; error: "assertion failed -- it always should fail"

  (declaim (optimize  (safety 0)))
  (byte-compile-file "bug.test.el" 'load)	; t
  (buggy)					; This should never show up!

I'm not sure whether this officially qualifies as a bug, but
it's certainly not the behavior I was expecting.  (It also
doesn't seem to be present in Emacs 23.1.1)

Thanks,
Rafael

~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
 Rafael Sorkin
 Perimeter Institute for Theoretical Physics
 31 Caroline Street North
 Waterloo, ON  N2L 2Y5
 Canada
~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-





             reply	other threads:[~2015-04-26  4:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-26  4:15 Rafael D Sorkin [this message]
2015-04-27  4:04 ` bug#20427: bug in optimizing compiler? Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1YmDyx-0003q2-LQ@mars.pi.local \
    --to=rsorkin@perimeterinstitute.ca \
    --cc=20427@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.