<p dir="auto">Consider:</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="function foo(x)
  y = convert(Vector{Float64},x)
  y[1] = 10.0
  return y
end
julia&gt; x = [1,2,3]
3-element Array{Int64,1}:
 1
 2
 3

julia&gt; foo(x)
3-element Array{Float64,1}:
 10.0
  2.0
  3.0

julia&gt; x
3-element Array{Int64,1}:
 1
 2
 3

julia&gt; x = [1.,2.,3.]
3-element Array{Float64,1}:
 1.0
 2.0
 3.0

julia&gt; foo(x)
3-element Array{Float64,1}:
 10.0
  2.0
  3.0

julia&gt; x
3-element Array{Float64,1}:
 10.0
  2.0
  3.0"><pre class="notranslate"><span class="pl-k">function</span> <span class="pl-en">foo</span>(x)
  y <span class="pl-k">=</span> <span class="pl-c1">convert</span>(Vector{Float64},x)
  y[<span class="pl-c1">1</span>] <span class="pl-k">=</span> <span class="pl-c1">10.0</span>
  <span class="pl-k">return</span> y
<span class="pl-k">end</span>
julia<span class="pl-k">&gt;</span> x <span class="pl-k">=</span> [<span class="pl-c1">1</span>,<span class="pl-c1">2</span>,<span class="pl-c1">3</span>]
<span class="pl-c1">3</span><span class="pl-k">-</span>element Array{Int64,<span class="pl-c1">1</span>}<span class="pl-k">:</span>
 <span class="pl-c1">1</span>
 <span class="pl-c1">2</span>
 <span class="pl-c1">3</span>

julia<span class="pl-k">&gt;</span> <span class="pl-c1">foo</span>(x)
<span class="pl-c1">3</span><span class="pl-k">-</span>element Array{Float64,<span class="pl-c1">1</span>}<span class="pl-k">:</span>
 <span class="pl-c1">10.0</span>
  <span class="pl-c1">2.0</span>
  <span class="pl-c1">3.0</span>

julia<span class="pl-k">&gt;</span> x
<span class="pl-c1">3</span><span class="pl-k">-</span>element Array{Int64,<span class="pl-c1">1</span>}<span class="pl-k">:</span>
 <span class="pl-c1">1</span>
 <span class="pl-c1">2</span>
 <span class="pl-c1">3</span>

julia<span class="pl-k">&gt;</span> x <span class="pl-k">=</span> [<span class="pl-c1">1.</span>,<span class="pl-c1">2.</span>,<span class="pl-c1">3.</span>]
<span class="pl-c1">3</span><span class="pl-k">-</span>element Array{Float64,<span class="pl-c1">1</span>}<span class="pl-k">:</span>
 <span class="pl-c1">1.0</span>
 <span class="pl-c1">2.0</span>
 <span class="pl-c1">3.0</span>

julia<span class="pl-k">&gt;</span> <span class="pl-c1">foo</span>(x)
<span class="pl-c1">3</span><span class="pl-k">-</span>element Array{Float64,<span class="pl-c1">1</span>}<span class="pl-k">:</span>
 <span class="pl-c1">10.0</span>
  <span class="pl-c1">2.0</span>
  <span class="pl-c1">3.0</span>

julia<span class="pl-k">&gt;</span> x
<span class="pl-c1">3</span><span class="pl-k">-</span>element Array{Float64,<span class="pl-c1">1</span>}<span class="pl-k">:</span>
 <span class="pl-c1">10.0</span>
  <span class="pl-c1">2.0</span>
  <span class="pl-c1">3.0</span></pre></div>
<p dir="auto">The input is modified in one case, and not the other, which is in the realms of "scary". One (The?) solution is to always do a copy, even if the type matches, for mutable types.</p>
<p dir="auto">this is an umbrella issue for tracking known issues with switching to LLVM35 as default. please edit this post or add a comment below. close when someone edits <code class="notranslate">deps/Versions.make</code> to <del><code class="notranslate">3.6.0</code></del> <code class="notranslate">3.7.0</code></p>
<p dir="auto">current known issues:</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> requires editing deps/Versions.make - <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="125800095" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/14623" data-hovercard-type="pull_request" data-hovercard-url="/JuliaLang/julia/pull/14623/hovercard" href="https://github.com/JuliaLang/julia/pull/14623">#14623</a></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="39789408" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/7910" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/7910/hovercard" href="https://github.com/JuliaLang/julia/issues/7910">#7910</a> (<a href="http://reviews.llvm.org/D6961" rel="nofollow">upstream patch</a> committed to 3.7 -- only an issue on Mac)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> figure out performance regression (perhaps only run passes once <del>(requires writing a <code class="notranslate">TargetMachine</code> wrapper and overloading <code class="notranslate">addPassesToEmitMC</code>)</del> (requires changes to LLVM to expose passes))</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> requires leaving behind LLVM33</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> would eliminate content from the "fixed in LLVM 3.5" issue label</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="41171385" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/8137" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/8137/hovercard" href="https://github.com/JuliaLang/julia/issues/8137">#8137</a></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="48613003" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/8999" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/8999/hovercard" href="https://github.com/JuliaLang/julia/issues/8999">#8999</a></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="51424119" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/9280" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/9280/hovercard" href="https://github.com/JuliaLang/julia/issues/9280">#9280</a></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="51882263" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/9339" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/9339/hovercard" href="https://github.com/JuliaLang/julia/issues/9339">#9339</a> <del>(LLVM36-only issue)</del></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="55996164" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/9967" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/9967/hovercard" href="https://github.com/JuliaLang/julia/issues/9967">#9967</a> (fixed in LLVM36)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="59502482" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/10377" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/10377/hovercard" href="https://github.com/JuliaLang/julia/issues/10377">#10377</a></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="59712802" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/10394" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/10394/hovercard" href="https://github.com/JuliaLang/julia/issues/10394">#10394</a></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="72480548" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/11085" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/11085/hovercard" href="https://github.com/JuliaLang/julia/issues/11085">#11085</a> linalg/arnoldi test on win64</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="72464823" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/11083" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/11083/hovercard" href="https://github.com/JuliaLang/julia/issues/11083">#11083</a></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <del><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="68233081" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/10806" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/10806/hovercard" href="https://github.com/JuliaLang/julia/issues/10806">#10806</a></del> (afaict, this is a non-fatal issue in valgrind. jwn)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="70869528" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/11003" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/11003/hovercard" href="https://github.com/JuliaLang/julia/issues/11003">#11003</a></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <del><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="106224074" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/13106" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/13106/hovercard" href="https://github.com/JuliaLang/julia/issues/13106">#13106</a></del> (this issue is a non-fatal performance regression. jwn)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> re-disable FPO</li>
</ul>
<p dir="auto">related:</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="39001785" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/7779" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/7779/hovercard" href="https://github.com/JuliaLang/julia/issues/7779">#7779</a> coverage flags are broken with LLVM 3.5 on master</li>
</ul>
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/Keno/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/Keno">@Keno</a></p>