Mercurial > projects > dstress
annotate run/n/new_28_C.d @ 1315:37c81d3385b7
[Issue 765] ArrayBoundsError when assigning slice of pointer
Frits van Bommel <fvbommel@wxs.nl>
2006-12-28
http://d.puremagic.com/issues/show_bug.cgi?id=765
author | thomask |
---|---|
date | Sun, 31 Dec 2006 14:28:54 +0000 |
parents | |
children |
rev | line source |
---|---|
1315
37c81d3385b7
[Issue 765] ArrayBoundsError when assigning slice of pointer
thomask
parents:
diff
changeset
|
1 // $HeadURL$ |
37c81d3385b7
[Issue 765] ArrayBoundsError when assigning slice of pointer
thomask
parents:
diff
changeset
|
2 // $Date$ |
37c81d3385b7
[Issue 765] ArrayBoundsError when assigning slice of pointer
thomask
parents:
diff
changeset
|
3 // $Author$ |
37c81d3385b7
[Issue 765] ArrayBoundsError when assigning slice of pointer
thomask
parents:
diff
changeset
|
4 |
37c81d3385b7
[Issue 765] ArrayBoundsError when assigning slice of pointer
thomask
parents:
diff
changeset
|
5 // @author@ Frits van Bommel <fvbommel@wxs.nl> |
37c81d3385b7
[Issue 765] ArrayBoundsError when assigning slice of pointer
thomask
parents:
diff
changeset
|
6 // @date@ 2006-12-28 |
37c81d3385b7
[Issue 765] ArrayBoundsError when assigning slice of pointer
thomask
parents:
diff
changeset
|
7 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=765 |
37c81d3385b7
[Issue 765] ArrayBoundsError when assigning slice of pointer
thomask
parents:
diff
changeset
|
8 // @desc@ [Issue 765] ArrayBoundsError when assigning slice of pointer |
37c81d3385b7
[Issue 765] ArrayBoundsError when assigning slice of pointer
thomask
parents:
diff
changeset
|
9 |
37c81d3385b7
[Issue 765] ArrayBoundsError when assigning slice of pointer
thomask
parents:
diff
changeset
|
10 module dstress.run.n.new_28_C; |
37c81d3385b7
[Issue 765] ArrayBoundsError when assigning slice of pointer
thomask
parents:
diff
changeset
|
11 |
37c81d3385b7
[Issue 765] ArrayBoundsError when assigning slice of pointer
thomask
parents:
diff
changeset
|
12 int main(){ |
37c81d3385b7
[Issue 765] ArrayBoundsError when assigning slice of pointer
thomask
parents:
diff
changeset
|
13 uint* x = (new uint[](5)).ptr; |
37c81d3385b7
[Issue 765] ArrayBoundsError when assigning slice of pointer
thomask
parents:
diff
changeset
|
14 |
37c81d3385b7
[Issue 765] ArrayBoundsError when assigning slice of pointer
thomask
parents:
diff
changeset
|
15 x[0 .. 0] = 1; |
37c81d3385b7
[Issue 765] ArrayBoundsError when assigning slice of pointer
thomask
parents:
diff
changeset
|
16 |
37c81d3385b7
[Issue 765] ArrayBoundsError when assigning slice of pointer
thomask
parents:
diff
changeset
|
17 if(x[0] != 0){ |
37c81d3385b7
[Issue 765] ArrayBoundsError when assigning slice of pointer
thomask
parents:
diff
changeset
|
18 assert(0); |
37c81d3385b7
[Issue 765] ArrayBoundsError when assigning slice of pointer
thomask
parents:
diff
changeset
|
19 } |
37c81d3385b7
[Issue 765] ArrayBoundsError when assigning slice of pointer
thomask
parents:
diff
changeset
|
20 |
37c81d3385b7
[Issue 765] ArrayBoundsError when assigning slice of pointer
thomask
parents:
diff
changeset
|
21 return 0; |
37c81d3385b7
[Issue 765] ArrayBoundsError when assigning slice of pointer
thomask
parents:
diff
changeset
|
22 } |