diff --git a/src/coreclr/gc/gc.cpp b/src/coreclr/gc/gc.cpp index 51220dbfa6b1b..ea7e85a924224 100644 --- a/src/coreclr/gc/gc.cpp +++ b/src/coreclr/gc/gc.cpp @@ -24199,6 +24199,7 @@ void gc_heap::garbage_collect (int n) #define mark_stack_empty_p() (mark_stack_base == mark_stack_tos) +#pragma optimize("", off) inline size_t gc_heap::get_promoted_bytes() { @@ -24245,6 +24246,7 @@ size_t gc_heap::get_promoted_bytes() #endif //MULTIPLE_HEAPS #endif //USE_REGIONS } +#pragma optimize("", on) #ifdef USE_REGIONS void gc_heap::sync_promoted_bytes()