[LLVMbugs] [Bug 6636] New: x86_64 vararg garbled with very long argument list
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Mar 17 09:04:02 PDT 2010
http://llvm.org/bugs/show_bug.cgi?id=6636
Summary: x86_64 vararg garbled with very long argument list
Product: libraries
Version: trunk
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: Backend: X86
AssignedTo: unassignedbugs at nondot.org
ReportedBy: benny.kra at gmail.com
CC: llvmbugs at cs.uiuc.edu
$ cat bug.c
// test by quest (http://code.google.com/p/quest-tester/)
// carefully reduced.
#include <assert.h>
#include <stdarg.h>
struct three {
int i[3];
};
static int check = 42;
static void foo(int i1, int i2, int i3, int i4, int i5, int i6, struct three
s1, ...) {
va_list ap;
va_start(ap, s1);
int arg = va_arg(ap, int);
assert(check == arg);
va_end(ap);
}
int main() {
struct three s;
foo(0, 0, 0, 0, 0, 0, s, check);
}
$ gcc bug.c && ./a.out && echo ok
ok
$ clang bug.c && ./a.out && echo ok
Assertion failed: (check == arg), function foo, file bug.c, line 17.
[1] 23350 abort ./a.out
$ clang --version
clang version 1.1 (trunk 98723)
Target: x86_64-apple-darwin10
Thread model: posix
llvm-gcc seems to have the same problem.
--
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