[llvm-bugs] [Bug 27845] New: Name lookup on inline variables does not account for live ranges on Windows

via llvm-bugs llvm-bugs at lists.llvm.org
Mon May 23 14:10:11 PDT 2016


https://llvm.org/bugs/show_bug.cgi?id=27845

            Bug ID: 27845
           Summary: Name lookup on inline variables does not account for
                    live ranges on Windows
           Product: lldb
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: lldb-dev at lists.llvm.org
          Reporter: zturner at google.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

If you have this code:

#include <stdio.h>

void test1(int) __attribute__ ((always_inline));
void test2(int) __attribute__ ((always_inline));

void test2(int b) {
    printf("test2(%d)\n", b);
}

void test1(int a) {
    printf("test1(%d)\n",  a);
    test2(a+1);
}

int main() {
    test2(42);
    test1(23);
}

And you put a breakpoint in test2, it will get hit first with the value b=42,
and then again with the value b=24.  If you're at the 2nd hit of the breakpoint
and you try to print the value of b, it says the name is ambiguous (presumably
because it can't decide between the first and the second b).

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160523/33278ed6/attachment.html>


More information about the llvm-bugs mailing list