[LLVMbugs] [Bug 8239] New: Wrong generation of code for implicit cast to variably modified type
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Sep 27 01:49:39 PDT 2010
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: unassignedclangbugs at nondot.org
ReportedBy: abramobagnara at tin.it
CC: llvmbugs at cs.uiuc.edu
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.
More information about the llvm-bugs
mailing list