http://llvm.org/bugs/show_bug.cgi?id=20547
Bug ID: 20547
Summary: Miscompilation for variadic function call
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>
static const struct S {
int _[5];
} s;
#define CST 1779363874
void callee_b0f(int a1, int a2, int a3, int a4, struct S a5, int a6, int a7,
...) {
va_list ap;
va_start(ap, a7);
int c = va_arg(ap, int);
assert(CST == c);
}
int main() {
callee_b0f(0, 0, 0, 0, s, 0, 0, CST);
return 0;
}
compiling this on a x86_64-unknown-linux-gnu fires an assert, gcc 4.6.3
compiles this just fine.
--
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