From 5a156beab35d2149bf532db7138db53f079d2b7b Mon Sep 17 00:00:00 2001 From: Andy Ayers Date: Mon, 1 Oct 2018 11:53:21 -0700 Subject: [PATCH] Fix test for GT_INDEX_ADDR to forcibly compile with minopts Update test introduced in dotnet/coreclr#20047 so that the key method `ReadBytes` is compiled with minopts by default. Commit migrated from https://github.com/dotnet/coreclr/commit/80334f6ed542a79aefc61f6f1ca25dc4a5755fb3 --- .../tests/src/JIT/Regression/JitBlue/GitHub_20040/GitHub_20040.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/coreclr/tests/src/JIT/Regression/JitBlue/GitHub_20040/GitHub_20040.cs b/src/coreclr/tests/src/JIT/Regression/JitBlue/GitHub_20040/GitHub_20040.cs index 4403273..0c611a9 100644 --- a/src/coreclr/tests/src/JIT/Regression/JitBlue/GitHub_20040/GitHub_20040.cs +++ b/src/coreclr/tests/src/JIT/Regression/JitBlue/GitHub_20040/GitHub_20040.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System; +using System.Runtime.CompilerServices; // GitHub 20040: operand ordering bug with GT_INDEX_ADDR // Requires minopts/tier0 to repro @@ -48,6 +49,7 @@ namespace GitHub_20040 return currentBuffer; } + [MethodImpl(MethodImplOptions.NoOptimization | MethodImplOptions.NoInlining)] public byte ReadByte() { int offset; -- 2.7.4