Mercurial > projects > dstress
view run/o/odd_bug_09_B.d @ 1597:8b9d4d2f925a
Fix typos in complex tests. See D bug 614.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Tue, 09 Sep 2008 16:53:58 +0200 |
parents | 1ee9a0dd42d9 |
children |
line wrap: on
line source
// $HeadURL$ // $Date$ // $Author$ // @author@ Johan Granberg <lijat.meREM@OVEgmail.com> // @date@ 2006-09-14 // @uri@ http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=8389 // @desc@ Incorrect code generation -O2 gdc module dstress.run.o.odd_bug_09_B; struct S{ union{ void delegate(uint) del; void function(uint) fp; } static S opCall(void function(uint) c,uint i){ S a; a.fp = c; return a; } } S s; static this(){ s.fp = &foo; } void foo(uint i){ } int main(){ foo(0); if(! s.fp){ assert(0); } s.fp(0); return 0; }