Mercurial > projects > dstress
changeset 1377:7e2f2adc7849
[Issue 763] Segfault compiling template code on Linux
Sean Kelly <sean@f4.ca>
2006-12-28
http://d.puremagic.com/issues/show_bug.cgi?id=763
author | thomask |
---|---|
date | Tue, 27 Feb 2007 16:44:11 +0000 |
parents | 0428e69041c3 |
children | fdd3e661958c |
files | compile/t/template_55_A.d nocompile/t/template_55_B.d nocompile/t/template_55_C.d |
diffstat | 3 files changed, 58 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/compile/t/template_55_A.d Tue Feb 27 16:44:11 2007 +0000 @@ -0,0 +1,26 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Sean Kelly <sean@f4.ca> +// @date@ 2006-12-28 +// @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=763 +// @desc@ [Issue 763] Segfault compiling template code on Linux + +module /*dstress.*/compile.t.template_55_A; + +struct IsEqual( T ){ + bool opCall( ){ + return p1 = p2; + } +} + +size_t bar( Elem, Pred = IsEqual!(Elem) )(){ + return 0; +} + +template find( Buf ){ + void find(){ + bar!(typeof(Buf[0]))(); + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/t/template_55_B.d Tue Feb 27 16:44:11 2007 +0000 @@ -0,0 +1,15 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Sean Kelly <sean@f4.ca> +// @date@ 2006-12-28 +// @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=763 +// @desc@ [Issue 763] Segfault compiling template code on Linux + +module /*dstress.*/nocompile.t.template_55_B; +import /*dstress.*/compile.t.template_55_A; + +void fn(){ + find!(char[])(); +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/t/template_55_C.d Tue Feb 27 16:44:11 2007 +0000 @@ -0,0 +1,17 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Sean Kelly <sean@f4.ca> +// @date@ 2006-12-28 +// @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=763 +// @desc@ [Issue 763] Segfault compiling template code on Linux + +// __DSTRESS_DFLAGS__ compile/t/template_55_A.d + +module /*dstress.*/nocompile.t.template_55_C; +import /*dstress.*/compile.t.template_55_A; + +void fn(){ + find!(char[])(); +}