Skip to content

Commit 1b0adc0

Browse files
committed
Fixing the NativeAOT field layout tests
1 parent 3457948 commit 1b0adc0

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

src/coreclr/tools/aot/ILCompiler.TypeSystem.Tests/CoreTestAssembly/Platform.cs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,4 +182,22 @@ public readonly struct Vector128<T>
182182
private readonly ulong _00;
183183
private readonly ulong _01;
184184
}
185+
186+
[Intrinsic]
187+
[StructLayout(LayoutKind.Sequential, Size = 32)]
188+
public readonly struct Vector256<T>
189+
where T : struct
190+
{
191+
private readonly Vector128<T> _lower;
192+
private readonly Vector128<T> _upper;
193+
}
194+
195+
[Intrinsic]
196+
[StructLayout(LayoutKind.Sequential, Size = 64)]
197+
public readonly struct Vector512<T>
198+
where T : struct
199+
{
200+
private readonly Vector256<T> _lower;
201+
private readonly Vector256<T> _upper;
202+
}
185203
}

src/coreclr/tools/aot/ILCompiler.TypeSystem.Tests/InstanceFieldLayoutTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -893,7 +893,7 @@ public void TestAutoTypeLayoutClass32Align()
893893
}
894894

895895
[Fact]
896-
public void TestAutoTypeLayoutClass16Align()
896+
public void TestAutoTypeLayoutClass64Align()
897897
{
898898
MetadataType classType = _testModule.GetType("Auto", "Class64Align");
899899
Assert.Equal(0x48, classType.InstanceByteCount.AsInt);

0 commit comments

Comments
 (0)