public unsafe string StackAllocStruct(int count) { SimpleStruct *s = stackalloc SimpleStruct[checked (count * 2)]; SimpleStruct *p = stackalloc SimpleStruct[10]; return(this.PointerReferenceExpression(&s->Y)); }
public unsafe string StackAllocStruct(int count) { SimpleStruct *ptr = stackalloc SimpleStruct[checked (count * 2)]; SimpleStruct *ptr2 = stackalloc SimpleStruct[10]; return(this.UsePointer(&ptr->Y)); }
public unsafe string StackAllocStruct(int count) { SimpleStruct *ptr = stackalloc SimpleStruct[checked (count * 2)]; SimpleStruct *ptr2 = stackalloc SimpleStruct[10]; ptr->X = count; ptr[1].X = ptr->X; for (int i = 2; i < 10; i++) { ptr[i].X = count; } return(this.UsePointer(&ptr->Y)); }
public unsafe string StackAllocStruct(int count) { SimpleStruct* ptr = stackalloc SimpleStruct[checked(count * 2)]; #if !(ROSLYN && OPT) // unused stackalloc gets optimized out by roslyn SimpleStruct* ptr2 = stackalloc SimpleStruct[10]; #endif ptr->X = count; ptr[1].X = ptr->X; for (int i = 2; i < 10; i++) { ptr[i].X = count; } return UsePointer(&ptr->Y); }
public unsafe long PointerSubtraction5(SimpleStruct *p, SimpleStruct *q) { return(p - q); }
public unsafe SimpleStruct *PointerArithmeticLong3s(SimpleStruct *p, long offset) { return(p - offset); }
public unsafe SimpleStruct *PointerArithmeticLong2s(SimpleStruct *p, long offset) { return(offset + p); }
public unsafe int PointerArithmetic6(SimpleStruct *p, int i) { return(p[i].X); }
public static unsafe SimpleStruct *PtrFunc2(SimpleStruct *a, A.B.C.MethodInfoTestStruct *b) { return((SimpleStruct *)0); }
public unsafe long Issue2158d(SimpleStruct *p, SimpleStruct *q) { return((long)p - (long)q); }
public unsafe SimpleStruct* PointerArithmeticLong1s(SimpleStruct* p, long offset) { return p + offset; }