We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Code motion is noticed when running tests with and without the debug info at O2. I've triaged this bug, and it's not a duplicate of BZ #18590.
========Testcase================== extern void foo(char *dst,unsigned siz,const char *src); extern const char * i2str(int);
struct AAA3 { AAA3(const char *value) { foo(text,sizeof(text),value);} void operator=(const char value) { foo(text,sizeof(text),value);} operator const char() const { return text;} char text[4]; };
void bar (int param1,int param2) { const char * temp(0);
if (param2) { temp = i2str(param2); } AAA3 var1(""); AAA3 var2("");
clang -c -g -O2 test.cpp -o test.g.o clang -c -O2 test.cpp -o test.o
objdump -d test.g.o > test.g.txt objdump -d test.o > test.txt
test.g.o: file format elf64-x86-64 23,25c23,25 < 39: 48 8d 3c 24 lea (%rsp),%rdi < 3d: be 04 00 00 00 mov $0x4,%esi < 42: 85 db test %ebx,%ebx
39: 85 db test %ebx,%ebx 3b: 48 8d 3c 24 lea (%rsp),%rdi 3f: be 04 00 00 00 mov $0x4,%esi
Katya.
The text was updated successfully, but these errors were encountered:
Fixed in r204865
For more details, refer to the Crucible review: http://reviews.llvm.org/D2970
Sorry, something went wrong.
No branches or pull requests
Extended Description
Code motion is noticed when running tests with and without the debug info at O2.
I've triaged this bug, and it's not a duplicate of BZ #18590.
========Testcase==================
extern void foo(char *dst,unsigned siz,const char *src);
extern const char * i2str(int);
struct AAA3 {
AAA3(const char *value) { foo(text,sizeof(text),value);}
void operator=(const char value) { foo(text,sizeof(text),value);}
operator const char() const { return text;}
char text[4];
};
void bar (int param1,int param2) {
const char * temp(0);
if (param2) {
temp = i2str(param2);
}
AAA3 var1("");
AAA3 var2("");
if (param1)
var2 = "+";
else
var2 = "-";
var1 = "";
}
clang -c -g -O2 test.cpp -o test.g.o
clang -c -O2 test.cpp -o test.o
objdump -d test.g.o > test.g.txt
objdump -d test.o > test.txt
diff test.txt test.g.txt
2c2
< test.o: file format elf64-x86-64
Katya.
The text was updated successfully, but these errors were encountered: