Uploaded image for project: 'Erlang/OTP'
  1. Erlang/OTP
  2. ERL-1471

Internal consistency check failed - bad_floating_point_state

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: OTP 23
    • Fix Version/s: None
    • Component/s: compiler
    • Labels:
      None

      Description

      The following snippet fails on latest 23 and master:

      -module(foo).
      -compile(export_all).curious(Width, Value, Opts) ->
        Height = Width / 25.0,
        _Middle = case Value of
          true -> Width / 2.0;
          false -> 0
        end,
        _More = Height + 1.
      

      The reason is:

      $ erlc foo.erl 
      foo: function curious/3+26:
        Internal consistency check failed - please report this bug.
        Instruction: {bif,fadd,{f,0},[{fr,0},{fr,1}],{fr,0}}
        Error:       {bad_floating_point_state,undefined}:foo.erl:2: Warning: export_all flag enabled - all functions will be exported
      foo.erl:4: Warning: variable 'Opts' is unused
      

      Thank you!

        Attachments

          Activity

            People

            Assignee:
            john John Högberg
            Reporter:
            josevalim José Valim
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: