Mercurial > projects > dstress
view run/c/cast_35_B.d @ 1630:d0efa3ae5522 default tip
run/mini/naked_asm5: New x86_64 ABI passes the arguments in reverse order.
author | David Nadlinger <code@klickverbot.at> |
---|---|
date | Sat, 23 Apr 2011 22:57:32 +0200 |
parents | ffdc1fcfe4ca |
children |
line wrap: on
line source
// $HeadURL$ // $Date$ // $Author$ // @author@ Matti Niemenmaa <deewiant@gmail.com> // @date@ 2007-04-05 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1097 // @desc@ [Issue 1097] Missing line number: casting array to array of different element size module dstress.run.c.cast_35_B; align(1) struct Big{ short a; byte b; } align(1) struct Small{ short a; } size_t test(int i){ Big[] b = new Big[i]; Small[] s = cast(Small[]) b; return s.length; } int main(char[][] args){ try{ test(args.length); }catch{ return 0; } assert(0); }