[lldb-dev] TestConstVariables failure expected?
daniel.malea at intel.com
Fri Feb 15 15:14:30 PST 2013
A question about a test case (TestConstVariables, which is compiled with -O3 btw):
I notice that using a recent clang (i.e. dotest.py -C $lldb/build-llvm/Release+Asserts/x86_64/Release+Asserts/bin/clang) produces a test failure whereas the clang shipped with the latest XCode (dotest.py -C clang) does not.
However, I'm wondering if the test case is correct:
extern int foo();
extern int bar();
extern int baaz(int i);
index = 512;
index = 256;
The test sets a breakpoint on the first line of main (before index is initialized to 512) and then tries to print index. It seems that there's no guarantee the compiler will initialize index at that point; . Should the breakpoint be set later? Or am I missing something in this testcase?
More information about the lldb-dev