.NET Decompiler with support for PDB generation, ReadyToRun, Metadata (&more) - cross-platform!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

18 lines
392 B

using System;
namespace ICSharpCode.Decompiler.Tests.TestCases.ILPretty
{
public static class StackAllocDuplicateStore
{
public unsafe static int Seq(int a, int b, int c)
{
byte* num = stackalloc byte[12];
*(int*)num = a;
*(int*)num = 99;
((int*)num)[1] = b;
((int*)num)[2] = c;
Span<int> span = new Span<int>(num, 3);
return span[0] + span[1] + span[2];
}
}
}