digitalmars.D.bugs - DMD crash with "= .dup" as an inout parameter
- Chris Sauls (16/16) Jul 17 2005 Yes I know this is a silly naughty thing to do in the first place, but t...
- =?ISO-8859-1?Q?Thomas_K=FChne?= (5/21) Jul 18 2005 Added to DStress as
Yes I know this is a silly naughty thing to do in the first place, but the compiler still shouldn't crash. Here's a minimal program that will cause the event. # 1# int main (char[][] args) { # 2# int[] foo, # 3# bar; # 4# # 5# func(bar = foo.dup); # 6# return 0; # 7# } # 8# # 9# void func(inout int[] x) { #10# } It issues this error: ## bug.d(5): bar = _adDup(foo,4) is not an lvalue Then crashes and burns. I'm using DMD 0.128 on Windows. -- Chris Sauls
Jul 17 2005
Chris Sauls wrote:Yes I know this is a silly naughty thing to do in the first place, but the compiler still shouldn't crash. Here's a minimal program that will cause the event. # 1# int main (char[][] args) { # 2# int[] foo, # 3# bar; # 4# # 5# func(bar = foo.dup); # 6# return 0; # 7# } # 8# # 9# void func(inout int[] x) { #10# } It issues this error: ## bug.d(5): bar = _adDup(foo,4) is not an lvalue Then crashes and burns. I'm using DMD 0.128 on Windows.Added to DStress as http://dstress.kuehne.cn/nocompile/o/opAssign_01_A.d http://dstress.kuehne.cn/nocompile/o/opAssign_01_B.d Thomas
Jul 18 2005