3c1f479b9d
Former-commit-id: 806294f5ded97629b74c85c09952f2a74fe182d9
29 lines
266 B
C#
29 lines
266 B
C#
// Compiler options: -unsafe
|
|
|
|
unsafe class C
|
|
{
|
|
int* X;
|
|
|
|
static int Main()
|
|
{
|
|
var ptrs = new[] { 0 };
|
|
|
|
fixed (int* p = ptrs) {
|
|
new C (p) {
|
|
X = {
|
|
[0] = 1
|
|
}
|
|
};
|
|
}
|
|
|
|
if (ptrs [0] != 1)
|
|
return 1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
C (int* x)
|
|
{
|
|
X = x;
|
|
}
|
|
} |