[Issue 21036] New: wrong code for non-pod types when compiled function with variadic static array
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Jul 11 03:25:55 UTC 2020
https://issues.dlang.org/show_bug.cgi?id=21036
Issue ID: 21036
Summary: wrong code for non-pod types when compiled function
with variadic static array
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: blocker
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: ilyayaroshenko at gmail.com
import std.stdio;
struct S
{
void* ptr;
this(this){pragma(inline, false); writeln("cp");}
~this(){pragma(inline, false); writeln("des");}
}
auto bar(S[2] a...)
{
return a;
}
void main()
{
bar(S.init, S.init);
}
$ dmd -run test.d
cp
cp
des
des
des
des
des
des
Expected 4 des, instead of 6.
--
More information about the Digitalmars-d-bugs
mailing list