http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60175
--- Comment #2 from Yury Gribov <y.gribov at samsung dot com> --- Created attachment 32132 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32132&action=edit Proposed patch So it looks like we are using wrong function here. Frequency does not need to have the same bounds as probability. I'm attaching a draft patch (only checked it for code in question).