title: Is it a bug that attempts to compile this code results in IDE terminating or the compiler failing to run?
body: <p>Beware of <code>Exit</code> command usage in inline functions! I have been using Delphi XE3 here.</p>
  
  <h1>Symptom</h1>
  
  <p>In certain circumstances, when a call is made to an inline function that contains <code>Exit</code> command, and <em>the return value</em> of the inline function is used <em>directly</em> in <code>WriteLn()</code>, the compiler reports an error message,</p>
  
  <blockquote>
    <p>"dcc" exited with code 1.</p>
  </blockquote>
  
  <p>or even worst, the Delphi IDE terminates without any confirmation.</p>
  
  <pre><code>function ProcessNumber(const iNumber: Integer): Boolean; inline;
  begin
    if iNumber = 0 then begin
      Result := False;
      Exit;
    end;
    // some code here ...
    Result := True;
  end;
  
  procedure Test;
  begin
    writeln( ProcessNumber(0) );
  end;
  
  begin
    Test;
    ReadLn;
  end.
  </code></pre>
  
  <p>However, if <em>the return value</em> of the inline function is stored in a variable, and then the variable is used in <code>WriteLn()</code>, the problem does not occur.</p>
  
  <pre><code>procedure Test;
  var
    b: Boolean;
  begin
    b := ProcessNumber(0);
    writeln(b);
  end;
  </code></pre>
  
  <h1>Questions</h1>
  
  <ol>
  <li>Is this a compiler bug?</li>
  <li>If this a bug, is there a workaround to safely exit from an inline function?</li>
  </ol>