summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Andreenko <seandree@microsoft.com>2017-04-24 09:39:25 -0700
committerGitHub <noreply@github.com>2017-04-24 09:39:25 -0700
commit5c8b9a6870a58e0af250ff822ca395e3fd8268bb (patch)
tree123e472465ae4fb02cd4f0f828460ba21cb66a0e
parentca57f75b406857113afff023f83da8ddc1bf7c9c (diff)
downloadcoreclr-5c8b9a6870a58e0af250ff822ca395e3fd8268bb.tar.gz
coreclr-5c8b9a6870a58e0af250ff822ca395e3fd8268bb.tar.bz2
coreclr-5c8b9a6870a58e0af250ff822ca395e3fd8268bb.zip
do not use = {nullptr} initialization. (#11153)
It worked incorrectly on desktop.
-rw-r--r--src/jit/flowgraph.cpp7
-rw-r--r--src/jit/importer.cpp3
-rw-r--r--src/jit/lsra.cpp6
3 files changed, 10 insertions, 6 deletions
diff --git a/src/jit/flowgraph.cpp b/src/jit/flowgraph.cpp
index c385155883..256213e19d 100644
--- a/src/jit/flowgraph.cpp
+++ b/src/jit/flowgraph.cpp
@@ -21809,8 +21809,8 @@ void Compiler::fgInvokeInlineeCompiler(GenTreeCall* call, InlineResult* inlineRe
noway_assert(opts.OptEnabled(CLFLG_INLINING));
// This is the InlineInfo struct representing a method to be inlined.
- InlineInfo inlineInfo = {nullptr};
-
+ InlineInfo inlineInfo;
+ memset(&inlineInfo, 0, sizeof(inlineInfo));
CORINFO_METHOD_HANDLE fncHandle = call->gtCallMethHnd;
inlineInfo.fncHandle = fncHandle;
@@ -21850,7 +21850,8 @@ void Compiler::fgInvokeInlineeCompiler(GenTreeCall* call, InlineResult* inlineRe
CORINFO_METHOD_HANDLE fncHandle;
InlineCandidateInfo* inlineCandidateInfo;
InlineInfo* inlineInfo;
- } param = {nullptr};
+ } param;
+ memset(&param, 0, sizeof(param));
param.pThis = this;
param.call = call;
diff --git a/src/jit/importer.cpp b/src/jit/importer.cpp
index 2e3ca81268..432cfc9282 100644
--- a/src/jit/importer.cpp
+++ b/src/jit/importer.cpp
@@ -17169,7 +17169,8 @@ void Compiler::impCheckCanInline(GenTreePtr call,
CORINFO_CONTEXT_HANDLE exactContextHnd;
InlineResult* result;
InlineCandidateInfo** ppInlineCandidateInfo;
- } param = {nullptr};
+ } param;
+ memset(&param, 0, sizeof(param));
param.pThis = this;
param.call = call;
diff --git a/src/jit/lsra.cpp b/src/jit/lsra.cpp
index 557614021d..0ac1d24203 100644
--- a/src/jit/lsra.cpp
+++ b/src/jit/lsra.cpp
@@ -9677,10 +9677,12 @@ void LinearScan::resolveEdge(BasicBlock* fromBlock,
// What interval is this register associated with?
// (associated with incoming reg)
- Interval* sourceIntervals[REG_COUNT] = {nullptr};
+ Interval* sourceIntervals[REG_COUNT];
+ memset(&sourceIntervals, 0, sizeof(sourceIntervals));
// Intervals for vars that need to be loaded from the stack
- Interval* stackToRegIntervals[REG_COUNT] = {nullptr};
+ Interval* stackToRegIntervals[REG_COUNT];
+ memset(&stackToRegIntervals, 0, sizeof(stackToRegIntervals));
// Get the starting insertion point for the "to" resolution
GenTreePtr insertionPoint = nullptr;