[Issue 21425] New: Using va_start twice results in wrong values
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Nov 24 22:50:32 UTC 2020
https://issues.dlang.org/show_bug.cgi?id=21425
Issue ID: 21425
Summary: Using va_start twice results in wrong values
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: tim.dlang at t-online.de
The following code fails with dmd v2.094.1 under Linux x86_64:
import core.vararg;
extern(C) void f(int dummy, ...)
{
va_list ap;
va_start(ap, dummy);
int x = va_arg!int(ap);
assert(x == 5);
va_end(ap);
va_start(ap, dummy);
int y = va_arg!int(ap);
assert(y == 5);
va_end(ap);
}
int main()
{
f(0, 5);
return 0;
}
Issue 14131 could be related.
--
More information about the Digitalmars-d-bugs
mailing list