<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - lldb prefers class member to function argument when evaluating expression"
   href="http://llvm.org/bugs/show_bug.cgi?id=17941">17941</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>lldb prefers class member to function argument when evaluating expression
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>lldb
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>3.2
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Macintosh
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>MacOS X
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>All Bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>lldb-dev@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>christophe@taodyne.com
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>I observed the issue while debugging something in the following code:
<a href="https://gitorious.org/xlr/xlr/commit/be2f08174b3a56a8673093f131945bb011350ddf">https://gitorious.org/xlr/xlr/commit/be2f08174b3a56a8673093f131945bb011350ddf</a>.
To reproduce easily, build XLR (I built it against LLVM 2.9, it's likely to
fail with more recent untested versions)

The following sequence exposes the problem:

ddd@Marypuce[atomic-gc] xlr> cat t.xl 
writeln "real ", (10 ^ (2.0))
writeln "int ", (10 ^ 2) 

ddd@Marypuce[atomic-gc] xlr> lldb xlr 
Current executable set to 'xlr' (x86_64).

(lldb) b 'XL::OCompiledUnit::CallInteger2Real'
Breakpoint 1: where = xlr`XL::OCompiledUnit::CallInteger2Real(XL::Tree*,
XL::Tree*) + 29 at symbols.cpp:3550, address = 0x00000001000be95d

(lldb) r t.xl
Process 12381 launched: '/Users/ddd/Work/tao-master/tao/xlr/xlr/xlr' (x86_64)
Process 12381 stopped
* thread #1: tid = 0x16daa7, 0x00000001000be95d
xlr`XL::OCompiledUnit::CallInteger2Real(this=0x00007fff5fbfce40,
compiled=0x000000010103fb80, value=0x00000001010b6100) + 29 at
symbols.cpp:3550, queue = 'com.apple.main-thread, stop reason = breakpoint 1.1
    frame #0: 0x00000001000be95d
xlr`XL::OCompiledUnit::CallInteger2Real(this=0x00007fff5fbfce40,
compiled=0x000000010103fb80, value=0x00000001010b6100) + 29 at symbols.cpp:3550

   3547    //    Compile code generating the children of an infix
   3548    //
----------------------------------------------------------------------------
   3549    {
-> 3550        Value *result = Known(value);
   3551        result = code->CreateCall(compiler->xl_integer2real, result);
   3552        NeedStorage(compiled);
   3553        MarkComputed(compiled, result);
(lldb) p value
(XL::value_map) $0 = size=0 {}

The declaration of the function is:

Value *OCompiledUnit::CallInteger2Real(Tree *compiled, Tree *value)

So I expect 'value' to return a Tree *, not a value_map. The value_map is
declared in class OCompiledUnit.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>