<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<br>
<br>
On 2/10/2012 11:12 AM, Masahiro Nakagawa wrote:
<blockquote
cite="mid:CADJXRfZNrMdDS8cG=LUjaRMXOM4T3PLZOTZ_p0Qmwf57QyJJ5A@mail.gmail.com"
type="cite">On Sat, Feb 11, 2012 at 3:49 AM, Walter Bright <span
dir="ltr"><<a moz-do-not-send="true"
href="mailto:walter@digitalmars.com">walter@digitalmars.com</a>></span>
wrote:<br>
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
<br>
<br>
On 2/10/2012 8:59 AM, Masahiro Nakagawa wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
Following code works on dmd 2.057, but causing segmentation
fault on dmd 2.058 beta.<br>
<br>
-----<br>
struct S<br>
{<br>
void foo(V)(in V v)<br>
{<br>
}<br>
<br>
void foo(Args...)(auto ref const Args args)<br>
{<br>
foreach (i, T; Args)<br>
foo(args[i]);<br>
}<br>
}<br>
<br>
void main()<br>
{<br>
S s;<br>
s.foo(10);<br>
}<br>
----<br>
<br>
Does anyone report this issue?<br>
This bug is critical for my msgpack-d and related libraries.<br>
<br>
</blockquote>
<br>
This compiles for me without error. When it runs, I get a
stack overflow. The reason looks clear - foo(Args) is
recursively calling itself. I don't think it's a bug in dmd.<br>
</blockquote>
</div>
<div><br>
</div>
<div>I retried above code using new beta on two environments.</div>
<div><br>
</div>
<div>Mac OS X 10.6.8 causes segmentation fault, but</div>
<div>Scientific Linux release 6.0 64bit works fine.</div>
<div><br>
</div>
<div>Does D allow above code?</div>
<pre wrap="">
</pre>
</blockquote>
<br>
Do you mean the compiler seg faults or the compiled program seg
faults?<br>
</body>
</html>