emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#20427: closed (bug in optimizing compiler?)


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#20427: closed (bug in optimizing compiler?)
Date: Mon, 27 Apr 2015 04:05:04 +0000

Your message dated Mon, 27 Apr 2015 00:04:05 -0400
with message-id <address@hidden>
and subject line Re: bug#20427: bug in optimizing compiler?
has caused the debbugs.gnu.org bug report #20427,
regarding bug in optimizing compiler?
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
20427: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=20427
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: bug in optimizing compiler? Date: Sun, 26 Apr 2015 00:15:51 -0400
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
~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-



--- End Message ---
--- Begin Message --- Subject: Re: bug#20427: bug in optimizing compiler? Date: Mon, 27 Apr 2015 00:04:05 -0400 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)
tags 20427 notabug
thanks

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

That's expected.  Just like C's `assert', CL's `assert' can be compiled
out depending on compilation options (in this case, depending on the
`safety' setting).


        Stefan


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]