[erlang-bugs] R16: HiPE failure with /bits in funs

Kostis Sagonas kostis@REDACTED
Wed Feb 13 00:47:24 CET 2013


On 02/12/2013 11:57 PM, Loïc Hoguin wrote:
> The following module fails to compile with R16. It also fails on R15B03
> and probably previous versions. I do not know HiPE internals so no patch.
>
>
> -module(hipe_error).
> -export([run/0]).
>
> run() ->
>     fun (<< $c, _/bits >>) -> ok end.

Well, actually the culprit here is neither the /bits nor the fun...
It's the $c!  For example, the following variant of your code compiles 
happily under HiPE:

   run() ->
       fun (<< X, _/bits >>) when X =:= $c -> ok end.

I'll put it on my (long) TODO list but it's unlikely that this will be 
fixed for R16B.

Merci beaucoup pour la rapport de bogue,

Kostis



More information about the erlang-bugs mailing list