http://llvm.org/bugs/show_bug.cgi?id=20566
Bug ID: 20566
Summary: Clang miscompiles varargs function when targeting
i686-pc-win32
Product: clang
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
consider:
#include <assert.h>
#include <stdarg.h>
#define CST 8573108
static void callee(long long a1, ...) {
va_list ap;
int l;
va_start(ap, a1);
l = va_arg(ap, int);
assert(l == CST);
va_end(ap);
}
int main(int argc, char **argv) {
callee(1743452LL, CST);
return 0;
}
This assert fires when compiled with clang, it passes just fine with MSVC.
--
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