http://llvm.org/bugs/show_bug.cgi?id=8239
Summary: Wrong generation of code for implicit cast to variably
modified type
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: LLVM Codegen
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
int g() {
++gs;
return 1;
}
void f(char (*a)[g()], int gs_);
void f(char (*a)[g()], int gs_) {
if (gs_ != 0)
gs = -1;
}
int main() {
char x[10];
f(&x, gs);
if (gs == 1)
return 0;
return 2;
}
This testcase shows that clang wrongly emit a call to g before to call f.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs