[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-kawa] [bug #47863] InternalError in compilation seemingly related t
From: |
Per Bothner |
Subject: |
[Bug-kawa] [bug #47863] InternalError in compilation seemingly related to if (int) |
Date: |
Fri, 06 May 2016 06:00:52 +0000 |
User-agent: |
Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:46.0) Gecko/20100101 Firefox/46.0 |
Update of bug #47863 (project kawa):
Status: None => Fixed
Assigned to: None => bothner
_______________________________________________________
Follow-up Comment #1:
I checked in a fix for this.
The reason that it only failed when ::int was specified was that in that case
the compiler could deduce that (if x ...) is always true. I.e. the if is
redundant - which is the reason this compiled bug wasn't caught before.
The reason the (set! x ...) was needed to trigger the bug was that otherwise
the compiler could and did constant-fold (if x A B) to A.
The two optimizations mentioned above are done at different phases in the
compiler (though probably shouldn't be), hence different effect.
I also checked in your testcase. However, I tweaked so it also tests that 0 is
true.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?47863>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/