diffstat for julia-1.0.3+dfsg julia-1.0.4+dfsg

 .travis.yml                                                                   |    2 
 VERSION                                                                       |    2 
 base/abstractset.jl                                                           |    6 
 base/arrayshow.jl                                                             |    7 
 base/compiler/ssair/passes.jl                                                 |   30 
 base/deepcopy.jl                                                              |    2 
 base/iterators.jl                                                             |    5 
 base/parse.jl                                                                 |    2 
 base/range.jl                                                                 |    4 
 base/reinterpretarray.jl                                                      |    5 
 base/strings/util.jl                                                          |    3 
 contrib/mac/app/julia.icns                                                    |binary
 debian/changelog                                                              |    8 
 debian/embedded/1609a05aee5d5960670738d8d834d91235bd6b1e                      |binary
 debian/embedded/93b6d6de857dc88e665d2c64397852ab9701ba24                      |binary
 debian/embedded/Pkg.source                                                    |    2 
 debian/source/include-binaries                                                |    2 
 deps/Versions.make                                                            |    4 
 deps/checksums/Pkg-1609a05aee5d5960670738d8d834d91235bd6b1e.tar.gz/md5        |    1 
 deps/checksums/Pkg-1609a05aee5d5960670738d8d834d91235bd6b1e.tar.gz/sha512     |    1 
 deps/checksums/Pkg-93b6d6de857dc88e665d2c64397852ab9701ba24.tar.gz/md5        |    1 
 deps/checksums/Pkg-93b6d6de857dc88e665d2c64397852ab9701ba24.tar.gz/sha512     |    1 
 deps/checksums/cacert-2019-01-23.pem/md5                                      |    1 
 deps/checksums/cacert-2019-01-23.pem/sha512                                   |    1 
 deps/checksums/libssh2-02ecf17a6d5f9837699e8fb3aad0c804caa67eeb.tar.gz/md5    |    1 
 deps/checksums/libssh2-02ecf17a6d5f9837699e8fb3aad0c804caa67eeb.tar.gz/sha512 |    1 
 deps/checksums/libssh2-30e9c1347e3b8baa2951db612f05e6d87fc8e2f2.tar.gz/md5    |    1 
 deps/checksums/libssh2-30e9c1347e3b8baa2951db612f05e6d87fc8e2f2.tar.gz/sha512 |    1 
 deps/checksums/mpfr-4.0.1.tar.bz2/md5                                         |    1 
 deps/checksums/mpfr-4.0.1.tar.bz2/sha512                                      |    1 
 deps/checksums/mpfr-4.0.2.tar.bz2/md5                                         |    1 
 deps/checksums/mpfr-4.0.2.tar.bz2/sha512                                      |    1 
 deps/gmp.mk                                                                   |    8 
 deps/libssh2.version                                                          |    4 
 deps/llvm.mk                                                                  |    2 
 deps/patches/gmp-config-ldflags.patch                                         |  381 ++++++++++
 src/crc32c.c                                                                  |    3 
 src/debuginfo.cpp                                                             |    3 
 src/disasm.cpp                                                                |   16 
 src/dump.c                                                                    |    4 
 src/gf.c                                                                      |   75 +
 src/julia-syntax.scm                                                          |   20 
 src/llvm-simdloop.cpp                                                         |    5 
 src/staticdata.c                                                              |    1 
 src/support/strtod.c                                                          |   17 
 stdlib/Distributed/src/macros.jl                                              |   17 
 stdlib/Distributed/test/distributed_exec.jl                                   |    2 
 stdlib/LinearAlgebra/src/diagonal.jl                                          |   13 
 stdlib/LinearAlgebra/test/diagonal.jl                                         |   26 
 stdlib/Pkg.version                                                            |    2 
 stdlib/Profile/src/Profile.jl                                                 |    4 
 stdlib/REPL/src/REPLCompletions.jl                                            |   31 
 stdlib/REPL/src/docview.jl                                                    |    4 
 stdlib/REPL/test/repl.jl                                                      |    6 
 stdlib/REPL/test/replcompletions.jl                                           |   18 
 stdlib/SHA/test/runtests.jl                                                   |   19 
 stdlib/SparseArrays/src/higherorderfns.jl                                     |    2 
 stdlib/SparseArrays/src/sparsematrix.jl                                       |   22 
 stdlib/SparseArrays/test/higherorderfns.jl                                    |   10 
 stdlib/SparseArrays/test/sparse.jl                                            |   18 
 stdlib/SuiteSparse/Project.toml                                               |    5 
 stdlib/SuiteSparse/src/umfpack.jl                                             |   18 
 stdlib/SuiteSparse/test/umfpack.jl                                            |   13 
 test/compiler/compiler.jl                                                     |   30 
 test/compiler/irpasses.jl                                                     |   51 +
 test/copy.jl                                                                  |    3 
 test/core.jl                                                                  |   14 
 test/iterators.jl                                                             |   24 
 test/keywordargs.jl                                                           |   11 
 test/offsetarray.jl                                                           |    2 
 test/parse.jl                                                                 |   18 
 test/precompile.jl                                                            |   22 
 test/ranges.jl                                                                |   14 
 test/reinterpretarray.jl                                                      |   19 
 test/sets.jl                                                                  |   21 
 test/strings/util.jl                                                          |    1 
 76 files changed, 941 insertions(+), 156 deletions(-)

diff -Nru julia-1.0.3+dfsg/base/abstractset.jl julia-1.0.4+dfsg/base/abstractset.jl
--- julia-1.0.3+dfsg/base/abstractset.jl	2018-12-18 01:34:45.000000000 +0000
+++ julia-1.0.4+dfsg/base/abstractset.jl	2019-05-16 03:38:24.000000000 +0000
@@ -67,9 +67,11 @@
 end
 
 max_values(::Type) = typemax(Int)
-max_values(T::Type{<:Union{Nothing,BitIntegerSmall}}) = 1 << (8*sizeof(T))
-max_values(T::Union) = max(max_values(T.a), max_values(T.b))
+max_values(T::Union{map(X -> Type{X}, BitIntegerSmall_types)...}) = 1 << (8*sizeof(T))
+# saturated addition to prevent overflow with typemax(Int)
+max_values(T::Union) = max(max_values(T.a), max_values(T.b), max_values(T.a) + max_values(T.b))
 max_values(::Type{Bool}) = 2
+max_values(::Type{Nothing}) = 1
 
 function union!(s::AbstractSet{T}, itr) where T
     haslength(itr) && sizehint!(s, length(s) + length(itr))
diff -Nru julia-1.0.3+dfsg/base/arrayshow.jl julia-1.0.4+dfsg/base/arrayshow.jl
--- julia-1.0.3+dfsg/base/arrayshow.jl	2018-12-18 01:34:45.000000000 +0000
+++ julia-1.0.4+dfsg/base/arrayshow.jl	2019-05-16 03:38:24.000000000 +0000
@@ -434,10 +434,11 @@
     io = IOContext(io, :typeinfo => eltype(v), :compact => get(io, :compact, true))
     limited = get(io, :limit, false)
     if limited && length(v) > 20
-        inds = axes1(v)
-        show_delim_array(io, v, opn, ",", "", false, inds[1], inds[1]+9)
+        axs1 = axes1(v)
+        f, l = first(axs1), last(axs1)
+        show_delim_array(io, v, opn, ",", "", false, f, f+9)
         print(io, "  …  ")
-        show_delim_array(io, v, "", ",", cls, false, inds[end-9], inds[end])
+        show_delim_array(io, v, "", ",", cls, false, l-9, l)
     else
         show_delim_array(io, v, opn, ",", cls, false)
     end
diff -Nru julia-1.0.3+dfsg/base/compiler/ssair/passes.jl julia-1.0.4+dfsg/base/compiler/ssair/passes.jl
--- julia-1.0.3+dfsg/base/compiler/ssair/passes.jl	2018-12-18 01:34:45.000000000 +0000
+++ julia-1.0.4+dfsg/base/compiler/ssair/passes.jl	2019-05-16 03:38:24.000000000 +0000
@@ -130,7 +130,7 @@
                 return defssa
             end
             if isa(def.val, SSAValue)
-                if isa(defssa, OldSSAValue) && !already_inserted(compact, defssa)
+                if is_old(compact, defssa)
                     defssa = OldSSAValue(def.val.id)
                 else
                     defssa = def.val
@@ -191,7 +191,7 @@
                 collect(Iterators.filter(1:length(def.edges)) do n
                     isassigned(def.values, n) || return false
                     val = def.values[n]
-                    if isa(defssa, OldSSAValue) && isa(val, SSAValue)
+                    if is_old(compact, defssa) && isa(val, SSAValue)
                         val = OldSSAValue(val.id)
                     end
                     edge_typ = widenconst(compact_exprtype(compact, val))
@@ -201,7 +201,7 @@
             for n in possible_predecessors
                 pred = def.edges[n]
                 val = def.values[n]
-                if isa(defssa, OldSSAValue) && isa(val, SSAValue)
+                if is_old(compact, defssa) && isa(val, SSAValue)
                     val = OldSSAValue(val.id)
                 end
                 if isa(val, AnySSAValue)
@@ -281,7 +281,7 @@
             end
             if is_tuple_call(compact.ir, def) && isa(field, Int) && 1 <= field < length(def.args)
                 lifted = def.args[1+field]
-                if isa(leaf, OldSSAValue) && isa(lifted, SSAValue)
+                if is_old(compact, leaf) && isa(lifted, SSAValue)
                     lifted = OldSSAValue(lifted.id)
                 end
                 if isa(lifted, GlobalRef) || isa(lifted, Expr)
@@ -320,7 +320,7 @@
                     compact[leaf] = def
                 end
                 lifted = def.args[1+field]
-                if isa(leaf, OldSSAValue) && isa(lifted, SSAValue)
+                if is_old(compact, leaf) && isa(lifted, SSAValue)
                     lifted = OldSSAValue(lifted.id)
                 end
                 if isa(lifted, GlobalRef) || isa(lifted, Expr)
@@ -339,7 +339,7 @@
                     # N.B.: This can be a bit dangerous because it can lead to
                     # infinite loops if we accidentally insert a node just ahead
                     # of where we are
-                    if isa(leaf, OldSSAValue) && (isa(field, Int) || isa(field, Symbol))
+                    if is_old(compact, leaf) && (isa(field, Int) || isa(field, Symbol))
                         (isa(typ, DataType) && (!typ.abstract)) || return nothing
                         @assert !typ.mutable
                         # If there's the potential for an undefref error on access, we cannot insert a getfield
@@ -425,6 +425,12 @@
     need_argupdate::Bool
 end
 
+function is_old(compact, @nospecialize(old_node_ssa))
+    isa(old_node_ssa, OldSSAValue) &&
+        !is_pending(compact, old_node_ssa) &&
+        !already_inserted(compact, old_node_ssa)
+end
+
 function perform_lifting!(compact::IncrementalCompact,
         visited_phinodes::Vector{Any}, @nospecialize(cache_key),
         lifting_cache::IdDict{Pair{AnySSAValue, Any}, AnySSAValue},
@@ -455,7 +461,7 @@
             isassigned(old_node.values, i) || continue
             val = old_node.values[i]
             orig_val = val
-            if isa(old_node_ssa, OldSSAValue) && !is_pending(compact, old_node_ssa) && !already_inserted(compact, old_node_ssa) && isa(val, SSAValue)
+            if is_old(compact, old_node_ssa) && isa(val, SSAValue)
                 val = OldSSAValue(val.id)
             end
             if isa(val, Union{NewSSAValue, SSAValue, OldSSAValue})
@@ -688,10 +694,14 @@
         compact[idx] = val === nothing ? nothing : val.x
     end
 
-    # Copy the use count, `finish` may modify it and for our predicate
-    # below we need it consistent with the state of the IR here.
+
+    non_dce_finish!(compact)
+    # Copy the use count, `simple_dce!` may modify it and for our predicate
+    # below we need it consistent with the state of the IR here (after tracking
+    # phi node arguments, but before dce).
     used_ssas = copy(compact.used_ssas)
-    ir = finish(compact)
+    simple_dce!(compact)
+    ir = complete(compact)
     # Now go through any mutable structs and see which ones we can eliminate
     for (idx, (intermediaries, defuse)) in defuses
         intermediaries = collect(intermediaries)
diff -Nru julia-1.0.3+dfsg/base/deepcopy.jl julia-1.0.4+dfsg/base/deepcopy.jl
--- julia-1.0.3+dfsg/base/deepcopy.jl	2018-12-18 01:34:45.000000000 +0000
+++ julia-1.0.4+dfsg/base/deepcopy.jl	2019-05-16 03:38:24.000000000 +0000
@@ -27,7 +27,7 @@
 """
 deepcopy(x) = deepcopy_internal(x, IdDict())::typeof(x)
 
-deepcopy_internal(x::Union{Symbol,Core.MethodInstance,Method,GlobalRef,DataType,Union,Task},
+deepcopy_internal(x::Union{Symbol,Core.MethodInstance,Method,GlobalRef,DataType,Union,UnionAll,Task},
                   stackdict::IdDict) = x
 deepcopy_internal(x::Tuple, stackdict::IdDict) =
     ntuple(i->deepcopy_internal(x[i], stackdict), length(x))
diff -Nru julia-1.0.3+dfsg/base/iterators.jl julia-1.0.4+dfsg/base/iterators.jl
--- julia-1.0.3+dfsg/base/iterators.jl	2018-12-18 01:34:45.000000000 +0000
+++ julia-1.0.4+dfsg/base/iterators.jl	2019-05-16 03:38:24.000000000 +0000
@@ -1094,10 +1094,9 @@
 
 @inline peek(s::Stateful, sentinel=nothing) = s.nextvalstate !== nothing ? s.nextvalstate[1] : sentinel
 @inline iterate(s::Stateful, state=nothing) = s.nextvalstate === nothing ? nothing : (popfirst!(s), nothing)
-IteratorSize(::Type{Stateful{VS,T}} where VS) where {T} =
-    isa(IteratorSize(T), SizeUnknown) ? SizeUnknown() : HasLength()
+IteratorSize(::Type{Stateful{T,VS}}) where {T,VS} = IteratorSize(T) isa HasShape ? HasLength() : IteratorSize(T)
 eltype(::Type{Stateful{T, VS}} where VS) where {T} = eltype(T)
-IteratorEltype(::Type{Stateful{VS,T}} where VS) where {T} = IteratorEltype(T)
+IteratorEltype(::Type{Stateful{T,VS}}) where {T,VS} = IteratorEltype(T)
 length(s::Stateful) = length(s.itr) - s.taken
 
 end
diff -Nru julia-1.0.3+dfsg/base/parse.jl julia-1.0.4+dfsg/base/parse.jl
--- julia-1.0.3+dfsg/base/parse.jl	2018-12-18 01:34:45.000000000 +0000
+++ julia-1.0.4+dfsg/base/parse.jl	2019-05-16 03:38:24.000000000 +0000
@@ -309,7 +309,7 @@
     end
 
     if i₊ == 0 # purely real or imaginary value
-        if iᵢ > 0 # purely imaginary
+        if iᵢ > i && !(iᵢ == i+1 && s[i] in ('+','-')) # purely imaginary (not "±inf")
             x = tryparse_internal(T, s, i, iᵢ-1, raise)
             x === nothing && return nothing
             return Complex{T}(zero(x),x)
diff -Nru julia-1.0.3+dfsg/base/range.jl julia-1.0.4+dfsg/base/range.jl
--- julia-1.0.3+dfsg/base/range.jl	2018-12-18 01:34:45.000000000 +0000
+++ julia-1.0.4+dfsg/base/range.jl	2019-05-16 03:38:24.000000000 +0000
@@ -608,8 +608,8 @@
     @_inline_meta
     ret = convert(T, first(v) + (i - 1)*step_hp(v))
     ok = ifelse(step(v) > zero(step(v)),
-                (ret <= v.stop) & (ret >= v.start),
-                (ret <= v.start) & (ret >= v.stop))
+                (ret <= last(v)) & (ret >= first(v)),
+                (ret <= first(v)) & (ret >= last(v)))
     @boundscheck ((i > 0) & ok) || throw_boundserror(v, i)
     ret
 end
diff -Nru julia-1.0.3+dfsg/base/reinterpretarray.jl julia-1.0.4+dfsg/base/reinterpretarray.jl
--- julia-1.0.3+dfsg/base/reinterpretarray.jl	2018-12-18 01:34:45.000000000 +0000
+++ julia-1.0.4+dfsg/base/reinterpretarray.jl	2019-05-16 03:38:24.000000000 +0000
@@ -33,8 +33,8 @@
         isbitstype(T) || throwbits(S, T, T)
         isbitstype(S) || throwbits(S, T, S)
         (N != 0 || sizeof(T) == sizeof(S)) || throwsize0(S, T)
-        ax1 = axes(a)[1]
         if N != 0 && sizeof(S) != sizeof(T)
+            ax1 = axes(a)[1]
             dim = length(ax1)
             rem(dim*sizeof(S),sizeof(T)) == 0 || thrownonint(S, T, dim)
             first(ax1) == 1 || throwaxes1(S, T, ax1)
@@ -68,12 +68,14 @@
 
 parent(a::ReinterpretArray) = a.parent
 dataids(a::ReinterpretArray) = dataids(a.parent)
+unaliascopy(a::ReinterpretArray{T}) where {T} = reinterpret(T, unaliascopy(a.parent))
 
 function size(a::ReinterpretArray{T,N,S} where {N}) where {T,S}
     psize = size(a.parent)
     size1 = div(psize[1]*sizeof(S), sizeof(T))
     tuple(size1, tail(psize)...)
 end
+size(a::ReinterpretArray{T,0}) where {T} = ()
 
 function axes(a::ReinterpretArray{T,N,S} where {N}) where {T,S}
     paxs = axes(a.parent)
@@ -81,6 +83,7 @@
     size1 = div(l*sizeof(S), sizeof(T))
     tuple(oftype(paxs[1], f:f+size1-1), tail(paxs)...)
 end
+axes(a::ReinterpretArray{T,0}) where {T} = ()
 
 elsize(::Type{<:ReinterpretArray{T}}) where {T} = sizeof(T)
 unsafe_convert(::Type{Ptr{T}}, a::ReinterpretArray{T,N,S} where N) where {T,S} = Ptr{T}(unsafe_convert(Ptr{S},a.parent))
diff -Nru julia-1.0.3+dfsg/base/strings/util.jl julia-1.0.4+dfsg/base/strings/util.jl
--- julia-1.0.3+dfsg/base/strings/util.jl	2018-12-18 01:34:45.000000000 +0000
+++ julia-1.0.4+dfsg/base/strings/util.jl	2019-05-16 03:38:24.000000000 +0000
@@ -96,6 +96,9 @@
 ```
 """
 function chop(s::AbstractString; head::Integer = 0, tail::Integer = 1)
+    if isempty(s)
+        return SubString(s)
+    end
     SubString(s, nextind(s, firstindex(s), head), prevind(s, lastindex(s), tail))
 end
 
Binary files /tmp/AW8fDzADw5/julia-1.0.3+dfsg/contrib/mac/app/julia.icns and /tmp/7gz3ZhCfwx/julia-1.0.4+dfsg/contrib/mac/app/julia.icns differ
diff -Nru julia-1.0.3+dfsg/debian/changelog julia-1.0.4+dfsg/debian/changelog
--- julia-1.0.3+dfsg/debian/changelog	2019-01-22 20:19:55.000000000 +0000
+++ julia-1.0.4+dfsg/debian/changelog	2019-05-17 09:01:01.000000000 +0000
@@ -1,3 +1,11 @@
+julia (1.0.4+dfsg-1) unstable; urgency=medium
+
+  * New upstream version 1.0.4+dfsg
+  * Uscan: Monitor the 1.0.X series.
+  * Upgrade embedded Pkg.jl -> 1609a05aee5d5960670738d8d834d91235bd6b1e
+
+ -- Mo Zhou <cdluminate@gmail.com>  Fri, 17 May 2019 09:01:01 +0000
+
 julia (1.0.3+dfsg-4) unstable; urgency=medium
 
   [ Mo Zhou ]
Binary files /tmp/AW8fDzADw5/julia-1.0.3+dfsg/debian/embedded/1609a05aee5d5960670738d8d834d91235bd6b1e and /tmp/7gz3ZhCfwx/julia-1.0.4+dfsg/debian/embedded/1609a05aee5d5960670738d8d834d91235bd6b1e differ
Binary files /tmp/AW8fDzADw5/julia-1.0.3+dfsg/debian/embedded/93b6d6de857dc88e665d2c64397852ab9701ba24 and /tmp/7gz3ZhCfwx/julia-1.0.4+dfsg/debian/embedded/93b6d6de857dc88e665d2c64397852ab9701ba24 differ
diff -Nru julia-1.0.3+dfsg/debian/embedded/Pkg.source julia-1.0.4+dfsg/debian/embedded/Pkg.source
--- julia-1.0.3+dfsg/debian/embedded/Pkg.source	2018-12-21 06:47:47.000000000 +0000
+++ julia-1.0.4+dfsg/debian/embedded/Pkg.source	2019-05-17 04:53:34.000000000 +0000
@@ -1 +1 @@
-https://api.github.com/repos/JuliaLang/Pkg.jl/tarball/93b6d6de857dc88e665d2c64397852ab9701ba24
+https://api.github.com/repos/JuliaLang/Pkg.jl/tarball/1609a05aee5d5960670738d8d834d91235bd6b1e
diff -Nru julia-1.0.3+dfsg/debian/source/include-binaries julia-1.0.4+dfsg/debian/source/include-binaries
--- julia-1.0.3+dfsg/debian/source/include-binaries	2019-01-14 08:02:00.000000000 +0000
+++ julia-1.0.4+dfsg/debian/source/include-binaries	2019-05-17 05:17:12.000000000 +0000
@@ -1,6 +1,6 @@
 debian/embedded/libuv-ed3700c849289ed01fe04273a7bf865340b2bd7e.tar.gz
 debian/embedded/libwhich-81e9723c0273d78493dc8c8ed570f68d9ce7e89e.tar.gz
-debian/embedded/93b6d6de857dc88e665d2c64397852ab9701ba24
+debian/embedded/1609a05aee5d5960670738d8d834d91235bd6b1e
 debian/embedded/Documenter.jl-0.20.0/docs/src/man/hosting/puttygen-generated.png
 debian/embedded/Documenter.jl-0.20.0/docs/src/man/hosting/puttygen-export-private-key.png
 debian/embedded/Documenter.jl-0.20.0/docs/src/man/hosting/puttygen.png
diff -Nru julia-1.0.3+dfsg/deps/checksums/cacert-2019-01-23.pem/md5 julia-1.0.4+dfsg/deps/checksums/cacert-2019-01-23.pem/md5
--- julia-1.0.3+dfsg/deps/checksums/cacert-2019-01-23.pem/md5	1970-01-01 00:00:00.000000000 +0000
+++ julia-1.0.4+dfsg/deps/checksums/cacert-2019-01-23.pem/md5	2019-05-16 03:38:24.000000000 +0000
@@ -0,0 +1 @@
+fccbe6cec7a76e3351ad32e305184787
diff -Nru julia-1.0.3+dfsg/deps/checksums/cacert-2019-01-23.pem/sha512 julia-1.0.4+dfsg/deps/checksums/cacert-2019-01-23.pem/sha512
--- julia-1.0.3+dfsg/deps/checksums/cacert-2019-01-23.pem/sha512	1970-01-01 00:00:00.000000000 +0000
+++ julia-1.0.4+dfsg/deps/checksums/cacert-2019-01-23.pem/sha512	2019-05-16 03:38:24.000000000 +0000
@@ -0,0 +1 @@
+01faebab60b49a30736e0c88b713999f48c99b425889f7df9bbb80eb91367a6f26f20befdf8ac72b8d77659b143b7b37f91ad7dac5fde37c1d621fc663003687
diff -Nru julia-1.0.3+dfsg/deps/checksums/libssh2-02ecf17a6d5f9837699e8fb3aad0c804caa67eeb.tar.gz/md5 julia-1.0.4+dfsg/deps/checksums/libssh2-02ecf17a6d5f9837699e8fb3aad0c804caa67eeb.tar.gz/md5
--- julia-1.0.3+dfsg/deps/checksums/libssh2-02ecf17a6d5f9837699e8fb3aad0c804caa67eeb.tar.gz/md5	1970-01-01 00:00:00.000000000 +0000
+++ julia-1.0.4+dfsg/deps/checksums/libssh2-02ecf17a6d5f9837699e8fb3aad0c804caa67eeb.tar.gz/md5	2019-05-16 03:38:24.000000000 +0000
@@ -0,0 +1 @@
+bcf01c3fa49a1684edc2d637ad7e03d6
diff -Nru julia-1.0.3+dfsg/deps/checksums/libssh2-02ecf17a6d5f9837699e8fb3aad0c804caa67eeb.tar.gz/sha512 julia-1.0.4+dfsg/deps/checksums/libssh2-02ecf17a6d5f9837699e8fb3aad0c804caa67eeb.tar.gz/sha512
--- julia-1.0.3+dfsg/deps/checksums/libssh2-02ecf17a6d5f9837699e8fb3aad0c804caa67eeb.tar.gz/sha512	1970-01-01 00:00:00.000000000 +0000
+++ julia-1.0.4+dfsg/deps/checksums/libssh2-02ecf17a6d5f9837699e8fb3aad0c804caa67eeb.tar.gz/sha512	2019-05-16 03:38:24.000000000 +0000
@@ -0,0 +1 @@
+ae4c798ae5c13ad1574646896665ccd1f7d91e64573a23662ce7016b00109c1c351013856c25bf12284d9c3996ca3b828506825e50fcb059969adc02a96c06f8
diff -Nru julia-1.0.3+dfsg/deps/checksums/libssh2-30e9c1347e3b8baa2951db612f05e6d87fc8e2f2.tar.gz/md5 julia-1.0.4+dfsg/deps/checksums/libssh2-30e9c1347e3b8baa2951db612f05e6d87fc8e2f2.tar.gz/md5
--- julia-1.0.3+dfsg/deps/checksums/libssh2-30e9c1347e3b8baa2951db612f05e6d87fc8e2f2.tar.gz/md5	2018-12-18 01:34:45.000000000 +0000
+++ julia-1.0.4+dfsg/deps/checksums/libssh2-30e9c1347e3b8baa2951db612f05e6d87fc8e2f2.tar.gz/md5	1970-01-01 00:00:00.000000000 +0000
@@ -1 +0,0 @@
-d251ef0efecff323b6f570cc737d3411
diff -Nru julia-1.0.3+dfsg/deps/checksums/libssh2-30e9c1347e3b8baa2951db612f05e6d87fc8e2f2.tar.gz/sha512 julia-1.0.4+dfsg/deps/checksums/libssh2-30e9c1347e3b8baa2951db612f05e6d87fc8e2f2.tar.gz/sha512
--- julia-1.0.3+dfsg/deps/checksums/libssh2-30e9c1347e3b8baa2951db612f05e6d87fc8e2f2.tar.gz/sha512	2018-12-18 01:34:45.000000000 +0000
+++ julia-1.0.4+dfsg/deps/checksums/libssh2-30e9c1347e3b8baa2951db612f05e6d87fc8e2f2.tar.gz/sha512	1970-01-01 00:00:00.000000000 +0000
@@ -1 +0,0 @@
-ae7535cf8f70e7c837e80365cd9ee7c4040d45e952871a3e5c8f1b71bd8eb2d96babb07fa4c5d66a83bb45960728ef8dbba30ab9a6387a68cf815a84cdae8795
diff -Nru julia-1.0.3+dfsg/deps/checksums/mpfr-4.0.1.tar.bz2/md5 julia-1.0.4+dfsg/deps/checksums/mpfr-4.0.1.tar.bz2/md5
--- julia-1.0.3+dfsg/deps/checksums/mpfr-4.0.1.tar.bz2/md5	2018-12-18 01:34:45.000000000 +0000
+++ julia-1.0.4+dfsg/deps/checksums/mpfr-4.0.1.tar.bz2/md5	1970-01-01 00:00:00.000000000 +0000
@@ -1 +0,0 @@
-8c21d8ac7460493b2b9f3ef3cc610454
diff -Nru julia-1.0.3+dfsg/deps/checksums/mpfr-4.0.1.tar.bz2/sha512 julia-1.0.4+dfsg/deps/checksums/mpfr-4.0.1.tar.bz2/sha512
--- julia-1.0.3+dfsg/deps/checksums/mpfr-4.0.1.tar.bz2/sha512	2018-12-18 01:34:45.000000000 +0000
+++ julia-1.0.4+dfsg/deps/checksums/mpfr-4.0.1.tar.bz2/sha512	1970-01-01 00:00:00.000000000 +0000
@@ -1 +0,0 @@
-c1674fc0a5edcde188bdf7d6d14063cfb4f1259b9eaf39d0081f7176e9921ca0af1b12b7aba1a9560d9f2d5f37329d22bc7b82f13421d91d83114b439bc60dcc
diff -Nru julia-1.0.3+dfsg/deps/checksums/mpfr-4.0.2.tar.bz2/md5 julia-1.0.4+dfsg/deps/checksums/mpfr-4.0.2.tar.bz2/md5
--- julia-1.0.3+dfsg/deps/checksums/mpfr-4.0.2.tar.bz2/md5	1970-01-01 00:00:00.000000000 +0000
+++ julia-1.0.4+dfsg/deps/checksums/mpfr-4.0.2.tar.bz2/md5	2019-05-16 03:38:24.000000000 +0000
@@ -0,0 +1 @@
+6d8a8bb46fe09ff44e21cdbf84f5cdac
diff -Nru julia-1.0.3+dfsg/deps/checksums/mpfr-4.0.2.tar.bz2/sha512 julia-1.0.4+dfsg/deps/checksums/mpfr-4.0.2.tar.bz2/sha512
--- julia-1.0.3+dfsg/deps/checksums/mpfr-4.0.2.tar.bz2/sha512	1970-01-01 00:00:00.000000000 +0000
+++ julia-1.0.4+dfsg/deps/checksums/mpfr-4.0.2.tar.bz2/sha512	2019-05-16 03:38:24.000000000 +0000
@@ -0,0 +1 @@
+18bb3a87123d02b7537bc298d41bdbb33e58b8c196cc4040578e3b470e86c6c89e1bd8ab8b3919d106fe5b86922ef8999dc1aba7c521ee90a69f690be288a30d
diff -Nru julia-1.0.3+dfsg/deps/checksums/Pkg-1609a05aee5d5960670738d8d834d91235bd6b1e.tar.gz/md5 julia-1.0.4+dfsg/deps/checksums/Pkg-1609a05aee5d5960670738d8d834d91235bd6b1e.tar.gz/md5
--- julia-1.0.3+dfsg/deps/checksums/Pkg-1609a05aee5d5960670738d8d834d91235bd6b1e.tar.gz/md5	1970-01-01 00:00:00.000000000 +0000
+++ julia-1.0.4+dfsg/deps/checksums/Pkg-1609a05aee5d5960670738d8d834d91235bd6b1e.tar.gz/md5	2019-05-16 03:38:24.000000000 +0000
@@ -0,0 +1 @@
+4e0bcbf65c67c86b1604e103db173d77
diff -Nru julia-1.0.3+dfsg/deps/checksums/Pkg-1609a05aee5d5960670738d8d834d91235bd6b1e.tar.gz/sha512 julia-1.0.4+dfsg/deps/checksums/Pkg-1609a05aee5d5960670738d8d834d91235bd6b1e.tar.gz/sha512
--- julia-1.0.3+dfsg/deps/checksums/Pkg-1609a05aee5d5960670738d8d834d91235bd6b1e.tar.gz/sha512	1970-01-01 00:00:00.000000000 +0000
+++ julia-1.0.4+dfsg/deps/checksums/Pkg-1609a05aee5d5960670738d8d834d91235bd6b1e.tar.gz/sha512	2019-05-16 03:38:24.000000000 +0000
@@ -0,0 +1 @@
+95022a2aee8bca4b8e1ce65b5e5840209cd7adb7d048a647c9501e15e0ebd37fb4e4a95e707a5ec001893789ae841e3300a615f8e21a711694fc288777eed726
diff -Nru julia-1.0.3+dfsg/deps/checksums/Pkg-93b6d6de857dc88e665d2c64397852ab9701ba24.tar.gz/md5 julia-1.0.4+dfsg/deps/checksums/Pkg-93b6d6de857dc88e665d2c64397852ab9701ba24.tar.gz/md5
--- julia-1.0.3+dfsg/deps/checksums/Pkg-93b6d6de857dc88e665d2c64397852ab9701ba24.tar.gz/md5	2018-12-18 01:34:45.000000000 +0000
+++ julia-1.0.4+dfsg/deps/checksums/Pkg-93b6d6de857dc88e665d2c64397852ab9701ba24.tar.gz/md5	1970-01-01 00:00:00.000000000 +0000
@@ -1 +0,0 @@
-498ed1792ccd8e3a895edf290d8066ca
diff -Nru julia-1.0.3+dfsg/deps/checksums/Pkg-93b6d6de857dc88e665d2c64397852ab9701ba24.tar.gz/sha512 julia-1.0.4+dfsg/deps/checksums/Pkg-93b6d6de857dc88e665d2c64397852ab9701ba24.tar.gz/sha512
--- julia-1.0.3+dfsg/deps/checksums/Pkg-93b6d6de857dc88e665d2c64397852ab9701ba24.tar.gz/sha512	2018-12-18 01:34:45.000000000 +0000
+++ julia-1.0.4+dfsg/deps/checksums/Pkg-93b6d6de857dc88e665d2c64397852ab9701ba24.tar.gz/sha512	1970-01-01 00:00:00.000000000 +0000
@@ -1 +0,0 @@
-83143d69e27da5fa58e5fa1ceab41aff7af242eea5399d4512c381d12fd90c7a3106db2a84af1f9a33c5bb917e7f05208310f34fd3b182595b581dc8070e3491
diff -Nru julia-1.0.3+dfsg/deps/gmp.mk julia-1.0.4+dfsg/deps/gmp.mk
--- julia-1.0.3+dfsg/deps/gmp.mk	2018-12-18 01:34:45.000000000 +0000
+++ julia-1.0.4+dfsg/deps/gmp.mk	2019-05-16 03:38:24.000000000 +0000
@@ -21,7 +21,13 @@
 	cd $(dir $@) && patch < $(SRCDIR)/patches/gmp-exception.patch
 	echo 1 > $@
 
-$(BUILDDIR)/gmp-$(GMP_VER)/build-configured: $(SRCCACHE)/gmp-$(GMP_VER)/source-extracted $(SRCCACHE)/gmp-$(GMP_VER)/build-patched
+$(SRCCACHE)/gmp-$(GMP_VER)/gmp-config-ldflags.patch-applied: | $(SRCCACHE)/gmp-$(GMP_VER)/build-patched
+	cd $(dir $@) && patch -p1 < $(SRCDIR)/patches/gmp-config-ldflags.patch
+	echo 1 > $@
+
+$(BUILDDIR)/gmp-$(GMP_VER)/build-configured: $(SRCCACHE)/gmp-$(GMP_VER)/gmp-config-ldflags.patch-applied
+
+$(BUILDDIR)/gmp-$(GMP_VER)/build-configured: $(SRCCACHE)/gmp-$(GMP_VER)/source-extracted
 	mkdir -p $(dir $@)
 	cd $(dir $@) && \
 	$(dir $<)/configure $(CONFIGURE_COMMON) F77= --enable-shared --disable-static $(GMP_CONFIGURE_OPTS)
diff -Nru julia-1.0.3+dfsg/deps/libssh2.version julia-1.0.4+dfsg/deps/libssh2.version
--- julia-1.0.3+dfsg/deps/libssh2.version	2018-12-18 01:34:45.000000000 +0000
+++ julia-1.0.4+dfsg/deps/libssh2.version	2019-05-16 03:38:24.000000000 +0000
@@ -1,2 +1,2 @@
-LIBSSH2_BRANCH=libssh2-1.8.0
-LIBSSH2_SHA1=30e9c1347e3b8baa2951db612f05e6d87fc8e2f2
+LIBSSH2_BRANCH=libssh2-1.8.2
+LIBSSH2_SHA1=02ecf17a6d5f9837699e8fb3aad0c804caa67eeb
diff -Nru julia-1.0.3+dfsg/deps/llvm.mk julia-1.0.4+dfsg/deps/llvm.mk
--- julia-1.0.3+dfsg/deps/llvm.mk	2018-12-18 01:34:45.000000000 +0000
+++ julia-1.0.4+dfsg/deps/llvm.mk	2019-05-16 03:38:24.000000000 +0000
@@ -65,7 +65,7 @@
 LLVM_CPPFLAGS += $(CPPFLAGS)
 LLVM_LDFLAGS += $(LDFLAGS)
 LLVM_CMAKE += -DLLVM_TARGETS_TO_BUILD:STRING="$(LLVM_TARGETS)" -DCMAKE_BUILD_TYPE="$(LLVM_CMAKE_BUILDTYPE)"
-LLVM_CMAKE += -DLLVM_ENABLE_ZLIB=OFF -DLLVM_ENABLE_LIBXML2=OFF
+LLVM_CMAKE += -DLLVM_ENABLE_ZLIB=OFF -DLLVM_ENABLE_LIBXML2=OFF -DLLVM_HOST_TRIPLE="$(or $(XC_HOST),$(BUILD_MACHINE))"
 ifeq ($(USE_POLLY_ACC),1)
 LLVM_CMAKE += -DPOLLY_ENABLE_GPGPU_CODEGEN=ON
 endif
diff -Nru julia-1.0.3+dfsg/deps/patches/gmp-config-ldflags.patch julia-1.0.4+dfsg/deps/patches/gmp-config-ldflags.patch
--- julia-1.0.3+dfsg/deps/patches/gmp-config-ldflags.patch	1970-01-01 00:00:00.000000000 +0000
+++ julia-1.0.4+dfsg/deps/patches/gmp-config-ldflags.patch	2019-05-16 03:38:24.000000000 +0000
@@ -0,0 +1,381 @@
+--- gmp-6.1.2/configure	2019-03-25 17:58:41.928471374 -0400
++++ gmp-6.1.2-LDFLAGS/configure	2019-03-26 13:08:07.756316866 -0400
+@@ -5880,7 +5880,7 @@ if test "$gmp_prog_cc_works" = yes; then
+ int main () { return 0; }
+ EOF
+   echo "Test compile: " >&5
+-  gmp_compile="$cc $cflags $cppflags conftest.c >&5"
++  gmp_compile="$cc $cflags $cppflags $LDFLAGS conftest.c >&5"
+   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
+   (eval $gmp_compile) 2>&5
+   ac_status=$?
+@@ -5934,7 +5934,7 @@ void *f() { return g(); }
+ int main () { return 0; }
+ EOF
+   echo "Test compile: function pointer return" >&5
+-  gmp_compile="$cc $cflags $cppflags conftest.c >&5"
++  gmp_compile="$cc $cflags $cppflags $LDFLAGS conftest.c >&5"
+   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
+   (eval $gmp_compile) 2>&5
+   ac_status=$?
+@@ -5990,7 +5990,7 @@ int cmov () { return (n >= 0 ? n : 0); }
+ int main () { return 0; }
+ EOF
+   echo "Test compile: cmov instruction" >&5
+-  gmp_compile="$cc $cflags $cppflags conftest.c >&5"
++  gmp_compile="$cc $cflags $cppflags $LDFLAGS conftest.c >&5"
+   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
+   (eval $gmp_compile) 2>&5
+   ac_status=$?
+@@ -6047,7 +6047,7 @@ unsigned long gcc303 () { return (unsign
+ int main () { return 0; }
+ EOF
+   echo "Test compile: double -> ulong conversion" >&5
+-  gmp_compile="$cc $cflags $cppflags conftest.c >&5"
++  gmp_compile="$cc $cflags $cppflags $LDFLAGS conftest.c >&5"
+   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
+   (eval $gmp_compile) 2>&5
+   ac_status=$?
+@@ -6102,7 +6102,7 @@ unsigned long fneg () { return -fneg_dat
+ int main () { return 0; }
+ EOF
+   echo "Test compile: double negation" >&5
+-  gmp_compile="$cc $cflags $cppflags conftest.c >&5"
++  gmp_compile="$cc $cflags $cppflags $LDFLAGS conftest.c >&5"
+   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
+   (eval $gmp_compile) 2>&5
+   ac_status=$?
+@@ -6158,7 +6158,7 @@ float ftod () { return (float) ftod_data
+ int main () { return 0; }
+ EOF
+   echo "Test compile: double -> float conversion" >&5
+-  gmp_compile="$cc $cflags $cppflags conftest.c >&5"
++  gmp_compile="$cc $cflags $cppflags $LDFLAGS conftest.c >&5"
+   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
+   (eval $gmp_compile) 2>&5
+   ac_status=$?
+@@ -6243,7 +6243,7 @@ param_init ()
+ int main () { return 0; }
+ EOF
+   echo "Test compile: gnupro alpha ev6 char spilling" >&5
+-  gmp_compile="$cc $cflags $cppflags conftest.c >&5"
++  gmp_compile="$cc $cflags $cppflags $LDFLAGS conftest.c >&5"
+   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
+   (eval $gmp_compile) 2>&5
+   ac_status=$?
+@@ -6294,7 +6294,7 @@ if test "$gmp_prog_cc_works" = yes; then
+ int k; int foo () { __builtin_alloca (k); }
+ EOF
+   echo "Test compile: __builtin_alloca availability" >&5
+-  gmp_compile="$cc $cflags $cppflags conftest.c >&5"
++  gmp_compile="$cc $cflags $cppflags $LDFLAGS conftest.c >&5"
+   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
+   (eval $gmp_compile) 2>&5
+   ac_status=$?
+@@ -6340,7 +6340,7 @@ int foo ()
+ int main () { return 0; }
+ EOF
+   echo "Test compile: alloca array" >&5
+-  gmp_compile="$cc $cflags $cppflags conftest.c >&5"
++  gmp_compile="$cc $cflags $cppflags $LDFLAGS conftest.c >&5"
+   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
+   (eval $gmp_compile) 2>&5
+   ac_status=$?
+@@ -6418,7 +6418,7 @@ int f ()
+ int main () { return 0; }
+ EOF
+   echo "Test compile: abs int -> double conversion" >&5
+-  gmp_compile="$cc $cflags $cppflags conftest.c >&5"
++  gmp_compile="$cc $cflags $cppflags $LDFLAGS conftest.c >&5"
+   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
+   (eval $gmp_compile) 2>&5
+   ac_status=$?
+@@ -6483,7 +6483,7 @@ int dummy;
+ int main () { return 0; }
+ EOF
+   echo "Test compile: long long reliability test 1" >&5
+-  gmp_compile="$cc $cflags $cppflags conftest.c >&5"
++  gmp_compile="$cc $cflags $cppflags $LDFLAGS conftest.c >&5"
+   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
+   (eval $gmp_compile) 2>&5
+   ac_status=$?
+@@ -6544,7 +6544,7 @@ int dummy;
+ int main () { return 0; }
+ EOF
+   echo "Test compile: long long reliability test 2" >&5
+-  gmp_compile="$cc $cflags $cppflags conftest.c >&5"
++  gmp_compile="$cc $cflags $cppflags $LDFLAGS conftest.c >&5"
+   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
+   (eval $gmp_compile) 2>&5
+   ac_status=$?
+@@ -6605,7 +6605,7 @@ int dummy;
+ int main () { return 0; }
+ EOF
+   echo "Test compile: freebsd hacked gcc" >&5
+-  gmp_compile="$cc $cflags $cppflags conftest.c >&5"
++  gmp_compile="$cc $cflags $cppflags $LDFLAGS conftest.c >&5"
+   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
+   (eval $gmp_compile) 2>&5
+   ac_status=$?
+@@ -6704,7 +6704,7 @@ main ()
+ 
+ EOF
+   echo "Test compile: mpn_lshift_com optimization" >&5
+-  gmp_compile="$cc $cflags $cppflags conftest.c >&5"
++  gmp_compile="$cc $cflags $cppflags $LDFLAGS conftest.c >&5"
+   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
+   (eval $gmp_compile) 2>&5
+   ac_status=$?
+@@ -6813,7 +6813,7 @@ main ()
+ 
+ EOF
+   echo "Test compile: mpn_lshift_com optimization 2" >&5
+-  gmp_compile="$cc $cflags $cppflags conftest.c >&5"
++  gmp_compile="$cc $cflags $cppflags $LDFLAGS conftest.c >&5"
+   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
+   (eval $gmp_compile) 2>&5
+   ac_status=$?
+@@ -7325,7 +7325,7 @@ _main:
+ 	xorl	%eax, %eax
+ 	ret
+ EOF
+-  gmp_compile="$cc $cflags $cppflags conftest.s -o conftest >&5"
++  gmp_compile="$cc $cflags $cppflags $LDFLAGS conftest.s -o conftest >&5"
+   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
+   (eval $gmp_compile) 2>&5
+   ac_status=$?
+@@ -7390,7 +7390,7 @@ $as_echo_n "checking compiler $cc $cflag
+   cat >conftest.c <<EOF
+ int main () { return 0; }
+ EOF
+-  gmp_compile="$cc $cflags -no-cpp-precomp conftest.c >conftest.out 2>&1"
++  gmp_compile="$cc $cflags $LDFLAGS -no-cpp-precomp conftest.c >conftest.out 2>&1"
+   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
+   (eval $gmp_compile) 2>&5
+   ac_status=$?
+@@ -7498,7 +7498,7 @@ if test "$gmp_prog_cc_works" = yes; then
+ int main () { return 0; }
+ EOF
+   echo "Test compile: " >&5
+-  gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5"
++  gmp_compile="$cc $cflags $cppflags $flag $LDFLAGS conftest.c >&5"
+   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
+   (eval $gmp_compile) 2>&5
+   ac_status=$?
+@@ -7552,7 +7552,7 @@ void *f() { return g(); }
+ int main () { return 0; }
+ EOF
+   echo "Test compile: function pointer return" >&5
+-  gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5"
++  gmp_compile="$cc $cflags $cppflags $flag $LDFLAGS conftest.c >&5"
+   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
+   (eval $gmp_compile) 2>&5
+   ac_status=$?
+@@ -7608,7 +7608,7 @@ int cmov () { return (n >= 0 ? n : 0); }
+ int main () { return 0; }
+ EOF
+   echo "Test compile: cmov instruction" >&5
+-  gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5"
++  gmp_compile="$cc $cflags $cppflags $flag $LDFLAGS conftest.c >&5"
+   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
+   (eval $gmp_compile) 2>&5
+   ac_status=$?
+@@ -7665,7 +7665,7 @@ unsigned long gcc303 () { return (unsign
+ int main () { return 0; }
+ EOF
+   echo "Test compile: double -> ulong conversion" >&5
+-  gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5"
++  gmp_compile="$cc $cflags $cppflags $flag $LDFLAGS conftest.c >&5"
+   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
+   (eval $gmp_compile) 2>&5
+   ac_status=$?
+@@ -7720,7 +7720,7 @@ unsigned long fneg () { return -fneg_dat
+ int main () { return 0; }
+ EOF
+   echo "Test compile: double negation" >&5
+-  gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5"
++  gmp_compile="$cc $cflags $cppflags $flag $LDFLAGS conftest.c >&5"
+   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
+   (eval $gmp_compile) 2>&5
+   ac_status=$?
+@@ -7776,7 +7776,7 @@ float ftod () { return (float) ftod_data
+ int main () { return 0; }
+ EOF
+   echo "Test compile: double -> float conversion" >&5
+-  gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5"
++  gmp_compile="$cc $cflags $cppflags $flag $LDFLAGS conftest.c >&5"
+   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
+   (eval $gmp_compile) 2>&5
+   ac_status=$?
+@@ -7861,7 +7861,7 @@ param_init ()
+ int main () { return 0; }
+ EOF
+   echo "Test compile: gnupro alpha ev6 char spilling" >&5
+-  gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5"
++  gmp_compile="$cc $cflags $cppflags $flag $LDFLAGS conftest.c >&5"
+   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
+   (eval $gmp_compile) 2>&5
+   ac_status=$?
+@@ -7912,7 +7912,7 @@ if test "$gmp_prog_cc_works" = yes; then
+ int k; int foo () { __builtin_alloca (k); }
+ EOF
+   echo "Test compile: __builtin_alloca availability" >&5
+-  gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5"
++  gmp_compile="$cc $cflags $cppflags $flag $LDFLAGS conftest.c >&5"
+   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
+   (eval $gmp_compile) 2>&5
+   ac_status=$?
+@@ -7958,7 +7958,7 @@ int foo ()
+ int main () { return 0; }
+ EOF
+   echo "Test compile: alloca array" >&5
+-  gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5"
++  gmp_compile="$cc $cflags $cppflags $flag $LDFLAGS conftest.c >&5"
+   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
+   (eval $gmp_compile) 2>&5
+   ac_status=$?
+@@ -8036,7 +8036,7 @@ int f ()
+ int main () { return 0; }
+ EOF
+   echo "Test compile: abs int -> double conversion" >&5
+-  gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5"
++  gmp_compile="$cc $cflags $cppflags $flag $LDFLAGS conftest.c >&5"
+   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
+   (eval $gmp_compile) 2>&5
+   ac_status=$?
+@@ -8101,7 +8101,7 @@ int dummy;
+ int main () { return 0; }
+ EOF
+   echo "Test compile: long long reliability test 1" >&5
+-  gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5"
++  gmp_compile="$cc $cflags $cppflags $flag $LDFLAGS conftest.c >&5"
+   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
+   (eval $gmp_compile) 2>&5
+   ac_status=$?
+@@ -8162,7 +8162,7 @@ int dummy;
+ int main () { return 0; }
+ EOF
+   echo "Test compile: long long reliability test 2" >&5
+-  gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5"
++  gmp_compile="$cc $cflags $cppflags $flag $LDFLAGS conftest.c >&5"
+   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
+   (eval $gmp_compile) 2>&5
+   ac_status=$?
+@@ -8223,7 +8223,7 @@ int dummy;
+ int main () { return 0; }
+ EOF
+   echo "Test compile: freebsd hacked gcc" >&5
+-  gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5"
++  gmp_compile="$cc $cflags $cppflags $flag $LDFLAGS conftest.c >&5"
+   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
+   (eval $gmp_compile) 2>&5
+   ac_status=$?
+@@ -8322,7 +8322,7 @@ main ()
+ 
+ EOF
+   echo "Test compile: mpn_lshift_com optimization" >&5
+-  gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5"
++  gmp_compile="$cc $cflags $cppflags $flag $LDFLAGS conftest.c >&5"
+   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
+   (eval $gmp_compile) 2>&5
+   ac_status=$?
+@@ -8431,7 +8431,7 @@ main ()
+ 
+ EOF
+   echo "Test compile: mpn_lshift_com optimization 2" >&5
+-  gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5"
++  gmp_compile="$cc $cflags $cppflags $flag $LDFLAGS conftest.c >&5"
+   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
+   (eval $gmp_compile) 2>&5
+   ac_status=$?
+@@ -9987,7 +9987,7 @@ main ()
+   return 0;
+ }
+ EOF
+-gmp_compile="$CC_FOR_BUILD conftest.c"
++gmp_compile="$CC_FOR_BUILD $LDFLAGS conftest.c"
+ cc_for_build_works=no
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
+   (eval $gmp_compile) 2>&5
+@@ -10019,7 +10019,7 @@ main ()
+   return 0;
+ }
+ EOF
+-gmp_compile="$HOST_CC conftest.c"
++gmp_compile="$HOST_CC $LDFLAGS conftest.c"
+ cc_for_build_works=no
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
+   (eval $gmp_compile) 2>&5
+@@ -10052,7 +10052,7 @@ main ()
+   return 0;
+ }
+ EOF
+-gmp_compile="$i conftest.c"
++gmp_compile="$i $LDFLAGS conftest.c"
+ cc_for_build_works=no
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
+   (eval $gmp_compile) 2>&5
+@@ -10132,7 +10132,7 @@ main ()
+ }
+ EOF
+ for i in .exe ,ff8 ""; do
+-  gmp_compile="$CC_FOR_BUILD conftest.c -o conftest$i"
++  gmp_compile="$CC_FOR_BUILD $LDFLAGS conftest.c -o conftest$i"
+   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
+   (eval $gmp_compile) 2>&5
+   ac_status=$?
+@@ -10168,7 +10168,7 @@ main (int argc, char **argv)
+   return 0;
+ }
+ EOF
+-gmp_compile="$CC_FOR_BUILD conftest.c"
++gmp_compile="$CC_FOR_BUILD $LDFLAGS conftest.c"
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
+   (eval $gmp_compile) 2>&5
+   ac_status=$?
+@@ -10210,7 +10210,7 @@ foo ()
+   return log (d);
+ }
+ EOF
+-gmp_compile="$CC_FOR_BUILD conftest.c -lm"
++gmp_compile="$CC_FOR_BUILD $LDFLAGS conftest.c -lm"
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
+   (eval $gmp_compile) 2>&5
+   ac_status=$?
+@@ -10543,7 +10543,7 @@ if test "$gmp_prog_cxx_works" = yes; the
+ int main (void) { return 0; }
+ EOF
+   echo "Test compile: " >&5
+-  gmp_cxxcompile="$CXX $CPPFLAGS $CXXFLAGS conftest.cc >&5"
++  gmp_cxxcompile="$CXX $CPPFLAGS $CXXFLAGS $LDFLAGS conftest.cc >&5"
+   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_cxxcompile\""; } >&5
+   (eval $gmp_cxxcompile) 2>&5
+   ac_status=$?
+@@ -10583,7 +10583,7 @@ using namespace foo;
+ int main (void) { return 0; }
+ EOF
+   echo "Test compile: namespace" >&5
+-  gmp_cxxcompile="$CXX $CPPFLAGS $CXXFLAGS conftest.cc >&5"
++  gmp_cxxcompile="$CXX $CPPFLAGS $CXXFLAGS $LDFLAGS conftest.cc >&5"
+   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_cxxcompile\""; } >&5
+   (eval $gmp_cxxcompile) 2>&5
+   ac_status=$?
+@@ -10629,7 +10629,7 @@ void someoutput (void) { std::cout << 12
+ int main (void) { return 0; }
+ EOF
+   echo "Test compile: std iostream" >&5
+-  gmp_cxxcompile="$CXX $CPPFLAGS $CXXFLAGS conftest.cc >&5"
++  gmp_cxxcompile="$CXX $CPPFLAGS $CXXFLAGS $LDFLAGS conftest.cc >&5"
+   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_cxxcompile\""; } >&5
+   (eval $gmp_cxxcompile) 2>&5
+   ac_status=$?
+@@ -27095,7 +27095,7 @@ for tmp_underscore in "" "_"; do
+ ${tmp_gsym_prefix}main$gmp_cv_asm_label_suffix
+ 	addl	$ ${tmp_underscore}_GLOBAL_OFFSET_TABLE_, %ebx
+ EOF
+-  gmp_compile="$CCAS $CFLAGS $CPPFLAGS $lt_prog_compiler_pic conftest.s >&5 && $CC $CFLAGS $CPPFLAGS $lt_prog_compiler_pic conftest.$OBJEXT >&5"
++  gmp_compile="$CCAS $CFLAGS $CPPFLAGS $lt_prog_compiler_pic conftest.s >&5 && $CC $CFLAGS $CPPFLAGS $LDFLAGS $lt_prog_compiler_pic conftest.$OBJEXT >&5"
+   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
+   (eval $gmp_compile) 2>&5
+   ac_status=$?
+
diff -Nru julia-1.0.3+dfsg/deps/Versions.make julia-1.0.4+dfsg/deps/Versions.make
--- julia-1.0.3+dfsg/deps/Versions.make	2018-12-18 01:34:45.000000000 +0000
+++ julia-1.0.4+dfsg/deps/Versions.make	2019-05-16 03:38:24.000000000 +0000
@@ -7,7 +7,7 @@
 UNWIND_VER = 1.1-julia2
 OSXUNWIND_VER = 0.0.5
 GMP_VER = 6.1.2
-MPFR_VER = 4.0.1
+MPFR_VER = 4.0.2
 PATCHELF_VER = 0.9
 MBEDTLS_VER = 2.6.0
 CURL_VER = 7.56.0
@@ -15,4 +15,4 @@
 # Specify the version of the Mozilla CA Certificate Store to obtain.
 # The versions of cacert.pem are identified by the date (YYYY-MM-DD) of their changes.
 # See https://curl.haxx.se/docs/caextract.html for more details.
-MOZILLA_CACERT_VERSION := 2018-06-20
+MOZILLA_CACERT_VERSION := 2019-01-23
diff -Nru julia-1.0.3+dfsg/src/crc32c.c julia-1.0.4+dfsg/src/crc32c.c
--- julia-1.0.3+dfsg/src/crc32c.c	2018-12-18 01:34:45.000000000 +0000
+++ julia-1.0.4+dfsg/src/crc32c.c	2019-05-16 03:38:24.000000000 +0000
@@ -43,6 +43,7 @@
 
 #include "julia.h"
 #include "julia_internal.h"
+#include "processor.h"
 
 #ifdef _CPU_AARCH64_
 #  include <sys/auxv.h>
@@ -333,7 +334,7 @@
 #  else
 static crc32c_func_t crc32c_dispatch(unsigned long hwcap)
 {
-    if (hwcap & HWCAP_CRC32)
+    if (hwcap & (1 << JL_AArch64_crc))
         return crc32c_armv8;
     return jl_crc32c_sw;
 }
diff -Nru julia-1.0.3+dfsg/src/debuginfo.cpp julia-1.0.4+dfsg/src/debuginfo.cpp
--- julia-1.0.3+dfsg/src/debuginfo.cpp	2018-12-18 01:34:45.000000000 +0000
+++ julia-1.0.4+dfsg/src/debuginfo.cpp	2019-05-16 03:38:24.000000000 +0000
@@ -1101,7 +1101,8 @@
         for (size_t i = 0; i < sysimg_fptrs.nclones; i++) {
             if (diff == sysimg_fptrs.clone_offsets[i]) {
                 uint32_t idx = sysimg_fptrs.clone_idxs[i] & jl_sysimg_val_mask;
-                frame0->linfo = sysimg_fvars_linfo[idx];
+                if (idx < sysimg_fvars_n) // items after this were cloned but not referenced directly by a method (such as our ccall PLT thunks)
+                    frame0->linfo = sysimg_fvars_linfo[idx];
                 break;
             }
         }
diff -Nru julia-1.0.3+dfsg/src/disasm.cpp julia-1.0.4+dfsg/src/disasm.cpp
--- julia-1.0.3+dfsg/src/disasm.cpp	2018-12-18 01:34:45.000000000 +0000
+++ julia-1.0.4+dfsg/src/disasm.cpp	2019-05-16 03:38:24.000000000 +0000
@@ -628,24 +628,23 @@
 {
     // GC safe
     // Get the host information
-    std::string TripleName = sys::getDefaultTargetTriple();
-    Triple TheTriple(Triple::normalize(TripleName));
+    Triple TheTriple(sys::getProcessTriple());
 
     const auto &target = jl_get_llvm_disasm_target();
     const auto &cpu = target.first;
     const auto &features = target.second;
 
     std::string err;
-    const Target *TheTarget = TargetRegistry::lookupTarget(TripleName, err);
+    const Target *TheTarget = TargetRegistry::lookupTarget(TheTriple.str(), err);
 
     // Set up required helpers and streamer
     std::unique_ptr<MCStreamer> Streamer;
     SourceMgr SrcMgr;
 
-    std::unique_ptr<MCAsmInfo> MAI(TheTarget->createMCAsmInfo(*TheTarget->createMCRegInfo(TripleName),TripleName));
+    std::unique_ptr<MCAsmInfo> MAI(TheTarget->createMCAsmInfo(*TheTarget->createMCRegInfo(TheTriple.str()), TheTriple.str()));
     assert(MAI && "Unable to create target asm info!");
 
-    std::unique_ptr<MCRegisterInfo> MRI(TheTarget->createMCRegInfo(TripleName));
+    std::unique_ptr<MCRegisterInfo> MRI(TheTarget->createMCRegInfo(TheTriple.str()));
     assert(MRI && "Unable to create target register info!");
 
     std::unique_ptr<MCObjectFileInfo> MOFI(new MCObjectFileInfo());
@@ -659,16 +658,15 @@
 
     // Set up Subtarget and Disassembler
     std::unique_ptr<MCSubtargetInfo>
-        STI(TheTarget->createMCSubtargetInfo(TripleName, cpu, features));
+        STI(TheTarget->createMCSubtargetInfo(TheTriple.str(), cpu, features));
     std::unique_ptr<MCDisassembler> DisAsm(TheTarget->createMCDisassembler(*STI, Ctx));
     if (!DisAsm) {
-        jl_printf(JL_STDERR, "ERROR: no disassembler for target %s\n",
-                  TripleName.c_str());
+        rstream << "ERROR: no disassembler for target " << TheTriple.str();
         return;
     }
     unsigned OutputAsmVariant = 0; // ATT or Intel-style assembly
 
-    if (strcmp(asm_variant, "intel")==0) {
+    if (strcmp(asm_variant, "intel") == 0) {
         OutputAsmVariant = 1;
     }
     bool ShowEncoding = false;
diff -Nru julia-1.0.3+dfsg/src/dump.c julia-1.0.4+dfsg/src/dump.c
--- julia-1.0.3+dfsg/src/dump.c	2018-12-18 01:34:45.000000000 +0000
+++ julia-1.0.4+dfsg/src/dump.c	2019-05-16 03:38:24.000000000 +0000
@@ -255,7 +255,7 @@
         return 0;
     if (module_in_worklist(p->name->module))
         return 0;
-    if (p->name->wrapper != (jl_value_t*)p0) {
+    if (jl_unwrap_unionall(p->name->wrapper) != (jl_value_t*)p) {
         if (!type_recursively_external(p))
             return 0;
     }
@@ -743,7 +743,7 @@
     else if (jl_is_unionall(v)) {
         write_uint8(s->s, TAG_UNIONALL);
         jl_datatype_t *d = (jl_datatype_t*)jl_unwrap_unionall(v);
-        if (jl_is_datatype(d) && d->name->wrapper == v &&
+        if (jl_is_datatype(d) && jl_unwrap_unionall(d->name->wrapper) == (jl_value_t*)d &&
             !module_in_worklist(d->name->module)) {
             write_uint8(s->s, 1);
             jl_serialize_value(s, d->name->module);
diff -Nru julia-1.0.3+dfsg/src/gf.c julia-1.0.4+dfsg/src/gf.c
--- julia-1.0.3+dfsg/src/gf.c	2018-12-18 01:34:45.000000000 +0000
+++ julia-1.0.4+dfsg/src/gf.c	2019-05-16 03:38:24.000000000 +0000
@@ -35,28 +35,6 @@
     return jl_get_ptls_states()->world_age;
 }
 
-JL_DLLEXPORT jl_value_t *jl_invoke(jl_method_instance_t *meth, jl_value_t **args, uint32_t nargs)
-{
-    jl_callptr_t fptr = meth->invoke;
-    if (fptr != jl_fptr_trampoline) {
-        return fptr(meth, args, nargs);
-    }
-    else {
-        // if this hasn't been inferred (compiled) yet,
-        // inferring it might not be able to handle the world range
-        // so we just do a generic apply here
-        // because that might actually be faster
-        // since it can go through the unrolled caches for this world
-        // and if inference is successful, this meth would get updated anyways,
-        // and we'll get the fast path here next time
-
-        // TODO: if `meth` came from an `invoke` call, we should make sure
-        // meth->def is called instead of doing normal dispatch.
-
-        return jl_apply(args, nargs);
-    }
-}
-
 /// ----- Handling for Julia callbacks ----- ///
 
 JL_DLLEXPORT int8_t jl_is_in_pure_context(void)
@@ -2200,6 +2178,8 @@
     return (jl_value_t*)entry;
 }
 
+jl_value_t *jl_gf_invoke_by_method(jl_method_t *method, jl_value_t **args, size_t nargs);
+
 // invoke()
 // this does method dispatch with a set of types to match other than the
 // types of the actual arguments. this means it sometimes does NOT call the
@@ -2212,13 +2192,10 @@
 jl_value_t *jl_gf_invoke(jl_value_t *types0, jl_value_t **args, size_t nargs)
 {
     size_t world = jl_get_ptls_states()->world_age;
-    jl_svec_t *tpenv = jl_emptysvec;
-    jl_tupletype_t *tt = NULL;
     jl_value_t *types = NULL;
-    JL_GC_PUSH3(&types, &tpenv, &tt);
+    JL_GC_PUSH1(&types);
     jl_value_t *gf = args[0];
     types = jl_argtype_with_function(gf, types0);
-    jl_methtable_t *mt = jl_gf_mtable(gf);
     jl_typemap_entry_t *entry = (jl_typemap_entry_t*)jl_gf_invoke_lookup(types, world);
 
     if ((jl_value_t*)entry == jl_nothing) {
@@ -2228,10 +2205,19 @@
 
     // now we have found the matching definition.
     // next look for or create a specialization of this definition.
+    JL_GC_POP();
+    return jl_gf_invoke_by_method(entry->func.method, args, nargs);
+}
 
-    jl_method_t *method = entry->func.method;
+jl_value_t *jl_gf_invoke_by_method(jl_method_t *method, jl_value_t **args, size_t nargs)
+{
+    size_t world = jl_get_ptls_states()->world_age;
     jl_method_instance_t *mfunc = NULL;
     jl_typemap_entry_t *tm = NULL;
+    jl_methtable_t *mt = jl_gf_mtable(args[0]);
+    jl_svec_t *tpenv = jl_emptysvec;
+    jl_tupletype_t *tt = NULL;
+    JL_GC_PUSH2(&tpenv, &tt);
     if (method->invokes.unknown != NULL)
         tm = jl_typemap_assoc_exact(method->invokes, args, nargs, jl_cachearg_offset(mt), world);
     if (tm) {
@@ -2248,7 +2234,7 @@
         if (method->invokes.unknown == NULL)
             method->invokes.unknown = jl_nothing;
 
-        mfunc = cache_method(mt, &method->invokes, entry->func.value, tt, method, world, tpenv, 1);
+        mfunc = cache_method(mt, &method->invokes, (jl_value_t*)method, tt, method, world, tpenv, 1);
         JL_UNLOCK(&method->writelock);
     }
     JL_GC_POP();
@@ -2303,6 +2289,33 @@
     return (jl_value_t*)mfunc;
 }
 
+JL_DLLEXPORT jl_value_t *jl_invoke(jl_method_instance_t *meth, jl_value_t **args, uint32_t nargs)
+{
+    jl_callptr_t fptr = meth->invoke;
+    if (fptr != jl_fptr_trampoline) {
+        return fptr(meth, args, nargs);
+    }
+    else {
+        // if this hasn't been inferred (compiled) yet,
+        // inferring it might not be able to handle the world range
+        // so we just do a generic apply here
+        // because that might actually be faster
+        // since it can go through the unrolled caches for this world
+        // and if inference is successful, this meth would get updated anyways,
+        // and we'll get the fast path here next time
+
+        jl_method_instance_t *mfunc = jl_lookup_generic_(args, nargs,
+                                                         jl_int32hash_fast(jl_return_address()),
+                                                         jl_get_ptls_states()->world_age);
+        // check whether `jl_apply_generic` would call the right method
+        if (mfunc->def.method == meth->def.method)
+            return mfunc->invoke(mfunc, args, nargs);
+
+        // no; came from an `invoke` call
+        return jl_gf_invoke_by_method(meth->def.method, args, nargs);
+    }
+}
+
 // Return value is rooted globally
 jl_function_t *jl_new_generic_function_with_supertype(jl_sym_t *name, jl_module_t *module, jl_datatype_t *st, int iskw)
 {
@@ -2395,6 +2408,12 @@
                 closure->max_valid = ml->max_world;
         }
     }
+    // In some corner cases type intersection is conservative and returns something
+    // for intersect(A, B) even though A is a dispatch tuple and !(A <: B).
+    // For dispatch purposes in such a case we know there's no match. This check
+    // fixes issue #30394.
+    if (jl_is_dispatch_tupletype(closure->match.type) && !closure->match.issubty)
+        return 1;
     // a method is shadowed if type <: S <: m->sig where S is the
     // signature of another applicable method
     /*
diff -Nru julia-1.0.3+dfsg/src/julia-syntax.scm julia-1.0.4+dfsg/src/julia-syntax.scm
--- julia-1.0.3+dfsg/src/julia-syntax.scm	2018-12-18 01:34:45.000000000 +0000
+++ julia-1.0.4+dfsg/src/julia-syntax.scm	2019-05-16 03:38:24.000000000 +0000
@@ -396,6 +396,8 @@
          (vararg (let ((l (if (null? pargl) '() (last pargl))))
                    (if (or (vararg? l) (varargexpr? l))
                        (list l) '())))
+         ;; positional args with vararg
+         (pargl-all pargl)
          ;; positional args without vararg
          (pargl (if (null? vararg) pargl (butlast pargl)))
          ;; positional args with everything required; for use by the core function
@@ -424,13 +426,7 @@
                            (filter nospecialize-meta? kargl)))
          ;; body statements
          (stmts (cdr body))
-         (positional-sparams
-          (filter (lambda (s)
-                    (let ((name (car s)))
-                      (or (expr-contains-eq name (cons 'list pargl))
-                          (and (pair? vararg) (expr-contains-eq name (car vararg)))
-                          (not (expr-contains-eq name (cons 'list kargl))))))
-                  sparams))
+         (positional-sparams (filter-sparams (cons 'list pargl-all) sparams))
          (keyword-sparams
           (filter (lambda (s)
                     (not (any (lambda (p) (eq? (car p) (car s)))
@@ -462,7 +458,7 @@
 
         ;; call with no keyword args
         ,(method-def-expr-
-          name positional-sparams (append pargl vararg)
+          name positional-sparams pargl-all
           `(block
             ,@(without-generated prologue)
             ,(let (;; call mangled(vals..., [rest_kw,] pargs..., [vararg]...)
@@ -478,9 +474,7 @@
 
         ;; call with unsorted keyword args. this sorts and re-dispatches.
         ,(method-def-expr-
-          name
-          ;; remove sparams that don't occur, to avoid printing the warning twice
-          (filter-sparams (cons 'list argl) positional-sparams)
+          name positional-sparams
           `((|::|
              ;; if there are optional positional args, we need to be able to reference the function name
              ,(if (any kwarg? pargl) (gensy) UNUSED)
@@ -2998,7 +2992,9 @@
                          (kill))
                        (cdr e)))
             (else
-             (mark-used e)
+             (if (eq? (car e) '=)
+                 (visit (caddr e))
+                 (mark-used e))
              (if (and (or (eq? (car e) '=)
                           (and (eq? (car e) 'method) (length> e 2)))
                       (has? unused (cadr e)))
diff -Nru julia-1.0.3+dfsg/src/llvm-simdloop.cpp julia-1.0.4+dfsg/src/llvm-simdloop.cpp
--- julia-1.0.3+dfsg/src/llvm-simdloop.cpp	2018-12-18 01:34:45.000000000 +0000
+++ julia-1.0.4+dfsg/src/llvm-simdloop.cpp	2019-05-16 03:38:24.000000000 +0000
@@ -207,8 +207,9 @@
         MDNode *n = L->getLoopID();
         if (!n) {
             // Loop does not have a LoopID yet, so give it one.
-            n = MDNode::get(Lh->getContext(), ArrayRef<Metadata *>(NULL));
-            n->replaceOperandWith(0, n);
+            auto temp_n = MDNode::getTemporary(Lh->getContext(), ArrayRef<Metadata *>(NULL));
+            temp_n->replaceOperandWith(0, temp_n.get());
+            n = MDNode::replaceWithPermanent(std::move(temp_n));
             L->setLoopID(n);
         }
 
diff -Nru julia-1.0.3+dfsg/src/staticdata.c julia-1.0.4+dfsg/src/staticdata.c
--- julia-1.0.3+dfsg/src/staticdata.c	2018-12-18 01:34:45.000000000 +0000
+++ julia-1.0.4+dfsg/src/staticdata.c	2019-05-16 03:38:24.000000000 +0000
@@ -1015,6 +1015,7 @@
     for (i = 0; i < sysimg_fvars_max; i++) {
         uintptr_t val = (uintptr_t)&linfos[i];
         uint32_t offset = load_uint32(&val);
+        linfos[i] = NULL;
         if (offset != 0) {
             int specfunc = 1;
             if (offset & ((uintptr_t)1 << (8 * sizeof(uint32_t) - 1))) {
diff -Nru julia-1.0.3+dfsg/src/support/strtod.c julia-1.0.4+dfsg/src/support/strtod.c
--- julia-1.0.3+dfsg/src/support/strtod.c	2018-12-18 01:34:45.000000000 +0000
+++ julia-1.0.4+dfsg/src/support/strtod.c	2019-05-16 03:38:24.000000000 +0000
@@ -118,9 +118,16 @@
 
     decimal_point_pos = NULL;
 
+    p = nptr;
+
+    /* parse leading spaces */
+    while (isspace((unsigned char)*p)) {
+        p++;
+    }
+
     /* Parse infinities and nans */
-    val = parse_inf_or_nan(nptr, endptr);
-    if (*endptr != nptr)
+    val = parse_inf_or_nan(p, endptr);
+    if (*endptr != p)
         return val;
 
     /* Set errno to zero, so that we can distinguish zero results
@@ -130,12 +137,6 @@
     /* We process the optional sign manually, then pass the remainder to
        the system strtod.  This ensures that the result of an underflow
        has the correct sign.  */
-    p = nptr;
-
-    /* parse leading spaces */
-    while (isspace((unsigned char)*p)) {
-        p++;
-    }
 
     /* Process leading sign, if present */
     if (*p == '-') {
diff -Nru julia-1.0.3+dfsg/stdlib/Distributed/src/macros.jl julia-1.0.4+dfsg/stdlib/Distributed/src/macros.jl
--- julia-1.0.3+dfsg/stdlib/Distributed/src/macros.jl	2018-12-18 01:34:45.000000000 +0000
+++ julia-1.0.4+dfsg/stdlib/Distributed/src/macros.jl	2019-05-16 03:38:24.000000000 +0000
@@ -135,24 +135,17 @@
 extract_imports!(imports, x) = imports
 function extract_imports!(imports, ex::Expr)
     if Meta.isexpr(ex, (:import, :using))
-        m = ex.args[1]
-        if isa(m, Expr) && m.head === :(:)
-            push!(imports, m.args[1].args[1])
-        else
-            for a in ex.args
-                push!(imports, a.args[1])
-            end
-        end
+        push!(imports, ex)
     elseif Meta.isexpr(ex, :let)
         extract_imports!(imports, ex.args[2])
     elseif Meta.isexpr(ex, (:toplevel, :block))
-        for i in eachindex(ex.args)
-            extract_imports!(imports, ex.args[i])
+        for arg in ex.args
+            extract_imports!(imports, arg)
         end
     end
     return imports
 end
-extract_imports(x) = extract_imports!(Symbol[], x)
+extract_imports(x) = extract_imports!(Any[], x)
 
 """
     @everywhere [procs()] expr
@@ -183,7 +176,7 @@
 end
 
 macro everywhere(procs, ex)
-    imps = [Expr(:import, m) for m in extract_imports(ex)]
+    imps = extract_imports(ex)
     return quote
         $(isempty(imps) ? nothing : Expr(:toplevel, imps...)) # run imports locally first
         let ex = $(Expr(:quote, ex)), procs = $(esc(procs))
diff -Nru julia-1.0.3+dfsg/stdlib/Distributed/test/distributed_exec.jl julia-1.0.4+dfsg/stdlib/Distributed/test/distributed_exec.jl
--- julia-1.0.3+dfsg/stdlib/Distributed/test/distributed_exec.jl	2018-12-18 01:34:45.000000000 +0000
+++ julia-1.0.4+dfsg/stdlib/Distributed/test/distributed_exec.jl	2019-05-16 03:38:24.000000000 +0000
@@ -8,7 +8,7 @@
 include(joinpath(Sys.BINDIR, "..", "share", "julia", "test", "testenv.jl"))
 
 @test Distributed.extract_imports(:(begin; import Foo, Bar; let; using Baz; end; end)) ==
-      [:Foo, :Bar, :Baz]
+      Any[:(import Foo, Bar), :(using Baz)]
 
 # Test a few "remote" invocations when no workers are present
 @test remote(myid)() == 1
diff -Nru julia-1.0.3+dfsg/stdlib/LinearAlgebra/src/diagonal.jl julia-1.0.4+dfsg/stdlib/LinearAlgebra/src/diagonal.jl
--- julia-1.0.3+dfsg/stdlib/LinearAlgebra/src/diagonal.jl	2018-12-18 01:34:45.000000000 +0000
+++ julia-1.0.4+dfsg/stdlib/LinearAlgebra/src/diagonal.jl	2019-05-16 03:38:24.000000000 +0000
@@ -168,7 +168,7 @@
 
 function rmul!(A::AbstractMatrix, D::Diagonal)
     @assert !has_offset_axes(A)
-    A .= A .* transpose(D.diag)
+    A .= A .* permutedims(D.diag)
     return A
 end
 
@@ -256,20 +256,20 @@
 
 function lmul!(adjA::Adjoint{<:Any,<:Diagonal}, B::AbstractMatrix)
     A = adjA.parent
-    return lmul!(conj(A.diag), B)
+    return lmul!(adjoint(A), B)
 end
 function lmul!(transA::Transpose{<:Any,<:Diagonal}, B::AbstractMatrix)
     A = transA.parent
-    return lmul!(A.diag, B)
+    return lmul!(transpose(A), B)
 end
 
 function rmul!(A::AbstractMatrix, adjB::Adjoint{<:Any,<:Diagonal})
     B = adjB.parent
-    return rmul!(A, conj(B.diag))
+    return rmul!(A, adjoint(B))
 end
 function rmul!(A::AbstractMatrix, transB::Transpose{<:Any,<:Diagonal})
     B = transB.parent
-    return rmul!(A, B.diag)
+    return rmul!(A, transpose(B))
 end
 
 # Get ambiguous method if try to unify AbstractVector/AbstractMatrix here using AbstractVecOrMat
@@ -508,10 +508,9 @@
 *(x::Adjoint{<:Any,<:AbstractVector}, D::Diagonal) = Adjoint(map((t,s) -> t'*s, D.diag, parent(x)))
 *(x::Adjoint{<:Any,<:AbstractVector}, D::Diagonal, y::AbstractVector) =
     mapreduce(t -> t[1]*t[2]*t[3], +, zip(x, D.diag, y))
-*(x::Transpose{<:Any,<:AbstractVector}, D::Diagonal) = Transpose(map(*, D.diag, parent(x)))
+*(x::Transpose{<:Any,<:AbstractVector}, D::Diagonal) = Transpose(map((t,s) -> transpose(t)*s, D.diag, parent(x)))
 *(x::Transpose{<:Any,<:AbstractVector}, D::Diagonal, y::AbstractVector) =
     mapreduce(t -> t[1]*t[2]*t[3], +, zip(x, D.diag, y))
-# TODO: these methods will yield row matrices, rather than adjoint/transpose vectors
 
 function cholesky!(A::Diagonal, ::Val{false} = Val(false); check::Bool = true)
     info = 0
diff -Nru julia-1.0.3+dfsg/stdlib/LinearAlgebra/test/diagonal.jl julia-1.0.4+dfsg/stdlib/LinearAlgebra/test/diagonal.jl
--- julia-1.0.3+dfsg/stdlib/LinearAlgebra/test/diagonal.jl	2018-12-18 01:34:45.000000000 +0000
+++ julia-1.0.4+dfsg/stdlib/LinearAlgebra/test/diagonal.jl	2019-05-16 03:38:24.000000000 +0000
@@ -441,10 +441,20 @@
         fullBB = copyto!(Matrix{Matrix{T}}(undef, 2, 2), BB)
         for (transform1, transform2) in ((identity,  identity),
                 (identity,  adjoint  ), (adjoint,   identity ), (adjoint,   adjoint  ),
-                (identity,  transpose), (transpose, identity ), (transpose, transpose) )
+                (identity,  transpose), (transpose, identity ), (transpose, transpose),
+                (identity,  Adjoint  ), (Adjoint,   identity ), (Adjoint,   Adjoint  ),
+                (identity,  Transpose), (Transpose, identity ), (Transpose, Transpose))
             @test *(transform1(D), transform2(B))::typeof(D) ≈ *(transform1(Matrix(D)), transform2(Matrix(B))) atol=2 * eps()
             @test *(transform1(DD), transform2(BB))::typeof(DD) == *(transform1(fullDD), transform2(fullBB))
         end
+        M = randn(T, 5, 5)
+        MM = [randn(T, 2, 2) for _ in 1:2, _ in 1:2]
+        for transform in (identity, adjoint, transpose, Adjoint, Transpose)
+            @test lmul!(transform(D), copy(M)) == *(transform(Matrix(D)), M)
+            @test rmul!(copy(M), transform(D)) == *(M, transform(Matrix(D)))
+            @test lmul!(transform(DD), copy(MM)) == *(transform(fullDD), MM)
+            @test rmul!(copy(MM), transform(DD)) == *(MM, transform(fullDD))
+        end
     end
 end
 
@@ -454,10 +464,16 @@
 end
 
 @testset "Multiplication with Adjoint and Transpose vectors (#26863)" begin
-    x = rand(5)
-    D = Diagonal(rand(5))
-    @test x'*D*x == (x'*D)*x == (x'*Array(D))*x
-    @test Transpose(x)*D*x == (Transpose(x)*D)*x == (Transpose(x)*Array(D))*x
+    x = collect(1:2)
+    xt = transpose(x)
+    A = reshape([[1 2; 3 4], zeros(Int,2,2), zeros(Int, 2, 2), [5 6; 7 8]], 2, 2)
+    D = Diagonal(A)
+    @test x'*D == x'*A == copy(x')*D == copy(x')*A
+    @test xt*D == xt*A == copy(xt)*D == copy(xt)*A
+    y = [x, x]
+    yt = transpose(y)
+    @test y'*D*y == (y'*D)*y == (y'*A)*y
+    @test yt*D*y == (yt*D)*y == (yt*A)*y
 end
 
 @testset "Triangular division by Diagonal #27989" begin
diff -Nru julia-1.0.3+dfsg/stdlib/Pkg.version julia-1.0.4+dfsg/stdlib/Pkg.version
--- julia-1.0.3+dfsg/stdlib/Pkg.version	2018-12-18 01:34:45.000000000 +0000
+++ julia-1.0.4+dfsg/stdlib/Pkg.version	2019-05-16 03:38:24.000000000 +0000
@@ -1,2 +1,2 @@
 PKG_BRANCH = master
-PKG_SHA1 = 93b6d6de857dc88e665d2c64397852ab9701ba24
+PKG_SHA1 = 1609a05aee5d5960670738d8d834d91235bd6b1e
diff -Nru julia-1.0.3+dfsg/stdlib/Profile/src/Profile.jl julia-1.0.4+dfsg/stdlib/Profile/src/Profile.jl
--- julia-1.0.3+dfsg/stdlib/Profile/src/Profile.jl	2018-12-18 01:34:45.000000000 +0000
+++ julia-1.0.4+dfsg/stdlib/Profile/src/Profile.jl	2019-05-16 03:38:24.000000000 +0000
@@ -514,6 +514,7 @@
                 # jump forward to the end of the inlining chain
                 # avoiding an extra (slow) lookup of `ip` in `lidict`
                 # and an extra chain of them in `down`
+                # note that we may even have this === parent (if we're ignoring this frame ip)
                 this = builder_value[fastkey]
                 let this = this
                     while this !== parent
@@ -532,8 +533,7 @@
                 frame = (frames isa Vector ? frames[i] : frames)
                 !C && frame.from_c && continue
                 key = (T === UInt64 ? ip : frame)
-                down = parent.down
-                this = get!(down, key) do
+                this = get!(parent.down, key) do
                     return StackFrameTree{T}()
                 end
                 this.frame = frame
diff -Nru julia-1.0.3+dfsg/stdlib/REPL/src/docview.jl julia-1.0.4+dfsg/stdlib/REPL/src/docview.jl
--- julia-1.0.3+dfsg/stdlib/REPL/src/docview.jl	2018-12-18 01:34:45.000000000 +0000
+++ julia-1.0.4+dfsg/stdlib/REPL/src/docview.jl	2019-05-16 03:38:24.000000000 +0000
@@ -21,13 +21,13 @@
 
 function _helpmode(io::IO, line::AbstractString)
     line = strip(line)
+    x = Meta.parse(line, raise = false, depwarn = false)
     expr =
-        if haskey(keywords, Symbol(line))
+        if haskey(keywords, Symbol(line)) || isexpr(x, :error) || isexpr(x, :invalid)
             # Docs for keywords must be treated separately since trying to parse a single
             # keyword such as `function` would throw a parse error due to the missing `end`.
             Symbol(line)
         else
-            x = Meta.parse(line, raise = false, depwarn = false)
             # Retrieving docs for macros requires us to make a distinction between the text
             # `@macroname` and `@macroname()`. These both parse the same, but are used by
             # the docsystem to return different results. The first returns all documentation
diff -Nru julia-1.0.3+dfsg/stdlib/REPL/src/REPLCompletions.jl julia-1.0.4+dfsg/stdlib/REPL/src/REPLCompletions.jl
--- julia-1.0.3+dfsg/stdlib/REPL/src/REPLCompletions.jl	2018-12-18 01:34:45.000000000 +0000
+++ julia-1.0.4+dfsg/stdlib/REPL/src/REPLCompletions.jl	2019-05-16 03:38:24.000000000 +0000
@@ -353,7 +353,7 @@
 function get_value_getfield(ex::Expr, fn)
     # Example :((top(getfield))(Base,:max))
     val, found = get_value_getfield(ex.args[2],fn) #Look up Base in Main and returns the module
-    found || return (nothing, false)
+    (found && length(ex.args) >= 3) || return (nothing, false)
     return get_value_getfield(ex.args[3], val) #Look up max in Base and returns the function if found.
 end
 get_value_getfield(sym, fn) = get_value(sym, fn)
@@ -407,7 +407,7 @@
     elseif sym.head === :ref
         # some simple cases of `expand`
         return try_get_type(Expr(:call, GlobalRef(Base, :getindex), sym.args...), fn)
-    elseif sym.head === :.
+    elseif sym.head === :.  && sym.args[2] isa QuoteNode # second check catches broadcasting
         return try_get_type(Expr(:call, GlobalRef(Core, :getfield), sym.args...), fn)
     end
     return (Any, false)
@@ -432,10 +432,21 @@
     args_ex = Any[]
     func, found = get_value(ex_org.args[1], context_module)
     !found && return Completion[]
-    for ex in ex_org.args[2:end]
-        val, found = get_type(ex, context_module)
-        push!(args_ex, val)
+
+    funargs = ex_org.args[2:end]
+    # handle broadcasting, but only handle number of arguments instead of
+    # argument types
+    if ex_org.head === :. && ex_org.args[2] isa Expr
+        for _ in ex_org.args[2].args
+            push!(args_ex, Any)
+        end
+    else
+        for ex in funargs
+            val, found = get_type(ex, context_module)
+            push!(args_ex, val)
+        end
     end
+
     out = Completion[]
     t_in = Tuple{Core.Typeof(func), args_ex...} # Input types
     na = length(args_ex)+1
@@ -610,12 +621,16 @@
 
     # Make sure that only bslash_completions is working on strings
     inc_tag==:string && return String[], 0:-1, false
-
     if inc_tag == :other && should_method_complete(partial)
         frange, method_name_end = find_start_brace(partial)
         ex = Meta.parse(partial[frange] * ")", raise=false, depwarn=false)
-        if isa(ex, Expr) && ex.head==:call
-            return complete_methods(ex, context_module), first(frange):method_name_end, false
+
+        if isa(ex, Expr)
+            if ex.head==:call
+                return complete_methods(ex, context_module), first(frange):method_name_end, false
+            elseif ex.head==:. && ex.args[2] isa Expr && ex.args[2].head==:tuple
+                return complete_methods(ex, context_module), first(frange):(method_name_end - 1), false
+            end
         end
     elseif inc_tag == :comment
         return Completion[], 0:-1, false
diff -Nru julia-1.0.3+dfsg/stdlib/REPL/test/replcompletions.jl julia-1.0.4+dfsg/stdlib/REPL/test/replcompletions.jl
--- julia-1.0.3+dfsg/stdlib/REPL/test/replcompletions.jl	2018-12-18 01:34:45.000000000 +0000
+++ julia-1.0.4+dfsg/stdlib/REPL/test/replcompletions.jl	2019-05-16 03:38:24.000000000 +0000
@@ -960,6 +960,16 @@
     @test s[r] == "y"
 end
 
+let s = ":(function foo(::Int) end).args[1].args[2]."
+    c, r = test_complete_context(s)
+    @test c == Any[]
+end
+
+let s = "log(log.(x),"
+    c, r = test_complete_context(s)
+    @test !isempty(c)
+end
+
 let s = "Base.return_types(getin"
     c, r = test_complete_context(s)
     @test "getindex" in c
@@ -980,6 +990,14 @@
     @test r == 1:4
     @test s[r] == "test"
 end
+
+let s = "test.(1,1, "
+    c, r, res = test_complete_context(s)
+    @test !res
+    @test length(c) == 4
+    @test r == 1:4
+    @test s[r] == "test"
+end
 
 let s = "prevind(\"θ\",1,"
     c, r, res = test_complete_context(s)
diff -Nru julia-1.0.3+dfsg/stdlib/REPL/test/repl.jl julia-1.0.4+dfsg/stdlib/REPL/test/repl.jl
--- julia-1.0.3+dfsg/stdlib/REPL/test/repl.jl	2018-12-18 01:34:45.000000000 +0000
+++ julia-1.0.4+dfsg/stdlib/REPL/test/repl.jl	2019-05-16 03:38:24.000000000 +0000
@@ -972,6 +972,12 @@
     @test Base.eval(REPL._helpmode(buf, line)) isa Union{Markdown.MD,Nothing}
 end
 
+# PR 30754, Issues #22013, #24871, #26933, #29282, #29361, #30348
+for line in ["′", "abstract", "type", "|=", ".="]
+    @test occursin("No documentation found.",
+        sprint(show, Base.eval(REPL._helpmode(IOBuffer(), line))::Union{Markdown.MD,Nothing}))
+end
+
 # PR #27562
 fake_repl() do stdin_write, stdout_read, repl
     repltask = @async begin
diff -Nru julia-1.0.3+dfsg/stdlib/SHA/test/runtests.jl julia-1.0.4+dfsg/stdlib/SHA/test/runtests.jl
--- julia-1.0.3+dfsg/stdlib/SHA/test/runtests.jl	2018-12-18 01:34:45.000000000 +0000
+++ julia-1.0.4+dfsg/stdlib/SHA/test/runtests.jl	2019-05-16 03:38:24.000000000 +0000
@@ -9,7 +9,8 @@
 lorem = "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
 so_many_as_array = repeat([0x61], 1000000)
 so_many_as_tuple = ntuple((i) -> 0x61, 1000000)
-file = ".sha"  # Subject to change
+tempdir = mktempdir()
+file = joinpath(tempdir, ".sha")
 fIO = open(file, "w")
 write(fIO, '\0')
 close(fIO)
@@ -274,16 +275,24 @@
 # test error if eltype of input is not UInt8
 for f in sha_funcs
     global nerrors
+    data = UInt32[0x23467, 0x324775]
     try
-        f(UInt32[0x23467, 0x324775])
-        warn("Non-UInt8 Arrays should fail")
-        nerrors += 1
-    catch
+        f(data)
+    catch ex
+        if ex isa MethodError &&
+            ex.f === f &&
+            ex.args === (data,)
+            continue
+        end
+        rethrow()
     end
+    warn("Non-UInt8 Arrays should fail")
+    nerrors += 1
 end
 
 # Clean up the I/O mess
 rm(file)
+rm(tempdir)
 
 if nerrors == 0
     VERBOSE && println("ALL OK")
diff -Nru julia-1.0.3+dfsg/stdlib/SparseArrays/src/higherorderfns.jl julia-1.0.4+dfsg/stdlib/SparseArrays/src/higherorderfns.jl
--- julia-1.0.3+dfsg/stdlib/SparseArrays/src/higherorderfns.jl	2018-12-18 01:34:45.000000000 +0000
+++ julia-1.0.4+dfsg/stdlib/SparseArrays/src/higherorderfns.jl	2019-05-16 03:38:24.000000000 +0000
@@ -383,7 +383,7 @@
             vals, ks, rows = _fusedupdate_all(rowsentinel, activerow, rows, ks, stopks, As)
             Cx = f(vals...)
             if !_iszero(Cx)
-                Ck > spaceC && (spaceC = expandstorage!(C, Ck + min(length(C), _sumnnzs(As...)) - (sum(ks) - N)))
+                Ck > spaceC && (spaceC = expandstorage!(C, min(length(C), Ck + _sumnnzs(As...) - (sum(ks) - N))))
                 storedinds(C)[Ck] = activerow
                 storedvals(C)[Ck] = Cx
                 Ck += 1
diff -Nru julia-1.0.3+dfsg/stdlib/SparseArrays/src/sparsematrix.jl julia-1.0.4+dfsg/stdlib/SparseArrays/src/sparsematrix.jl
--- julia-1.0.3+dfsg/stdlib/SparseArrays/src/sparsematrix.jl	2018-12-18 01:34:45.000000000 +0000
+++ julia-1.0.4+dfsg/stdlib/SparseArrays/src/sparsematrix.jl	2019-05-16 03:38:24.000000000 +0000
@@ -1558,12 +1558,22 @@
 sparse(s::UniformScaling, m::Integer, n::Integer) = sparse(s, Dims((m, n)))
 
 # TODO: More appropriate location?
-conj!(A::SparseMatrixCSC) = (@inbounds broadcast!(conj, A.nzval, A.nzval); A)
-(-)(A::SparseMatrixCSC) = SparseMatrixCSC(A.m, A.n, copy(A.colptr), copy(A.rowval), map(-, A.nzval))
+function conj!(A::SparseMatrixCSC)
+    map!(conj, nzvalview(A), nzvalview(A))
+    return A
+end
+function (-)(A::SparseMatrixCSC)
+    nzval = similar(A.nzval)
+    map!(-, view(nzval, 1:nnz(A)), nzvalview(A))
+    return SparseMatrixCSC(A.m, A.n, copy(A.colptr), copy(A.rowval), nzval)
+end
 
 # the rest of real, conj, imag are handled correctly via AbstractArray methods
-conj(A::SparseMatrixCSC{<:Complex}) =
-    SparseMatrixCSC(A.m, A.n, copy(A.colptr), copy(A.rowval), conj(A.nzval))
+function conj(A::SparseMatrixCSC{<:Complex})
+    nzval = similar(A.nzval)
+    map!(conj, view(nzval, 1:nnz(A)), nzvalview(A))
+    return SparseMatrixCSC(A.m, A.n, copy(A.colptr), copy(A.rowval), nzval)
+end
 imag(A::SparseMatrixCSC{Tv,Ti}) where {Tv<:Real,Ti} = spzeros(Tv, Ti, A.m, A.n)
 
 ## Binary arithmetic and boolean operators
@@ -1968,8 +1978,8 @@
     return SparseMatrixCSC(m, nJ, colptrS, rowvalS, nzvalS)
 end
 
-getindex_traverse_col(::AbstractUnitRange, lo::Int, hi::Int) = lo:hi
-getindex_traverse_col(I::StepRange, lo::Int, hi::Int) = step(I) > 0 ? (lo:1:hi) : (hi:-1:lo)
+getindex_traverse_col(::AbstractUnitRange, lo::Integer, hi::Integer) = lo:hi
+getindex_traverse_col(I::StepRange, lo::Integer, hi::Integer) = step(I) > 0 ? (lo:1:hi) : (hi:-1:lo)
 
 function getindex(A::SparseMatrixCSC{Tv,Ti}, I::AbstractRange, J::AbstractVector) where {Tv,Ti<:Integer}
     @assert !has_offset_axes(A, I, J)
diff -Nru julia-1.0.3+dfsg/stdlib/SparseArrays/test/higherorderfns.jl julia-1.0.4+dfsg/stdlib/SparseArrays/test/higherorderfns.jl
--- julia-1.0.3+dfsg/stdlib/SparseArrays/test/higherorderfns.jl	2018-12-18 01:34:45.000000000 +0000
+++ julia-1.0.4+dfsg/stdlib/SparseArrays/test/higherorderfns.jl	2019-05-16 03:38:24.000000000 +0000
@@ -632,4 +632,14 @@
     @test minimum(sparse([1, 2], [1, 2], ones(Int32, 2)), dims = 1) isa Matrix
 end
 
+@testset "issue #31758: out of bounds write in _map_zeropres!" begin
+    y = sparsevec([2,7], [1., 2.], 10)
+    x1 = sparsevec(fill(1.0, 10))
+    x2 = sparsevec([2,7], [1., 2.], 10)
+    x3 = sparsevec(fill(1.0, 10))
+    f(x, y, z) = x == y == z == 0 ? 0.0 : NaN
+    y .= f.(x1, x2, x3)
+    @test all(isnan, y)
+end
+
 end # module
diff -Nru julia-1.0.3+dfsg/stdlib/SparseArrays/test/sparse.jl julia-1.0.4+dfsg/stdlib/SparseArrays/test/sparse.jl
--- julia-1.0.3+dfsg/stdlib/SparseArrays/test/sparse.jl	2018-12-18 01:34:45.000000000 +0000
+++ julia-1.0.4+dfsg/stdlib/SparseArrays/test/sparse.jl	2019-05-16 03:38:24.000000000 +0000
@@ -92,6 +92,10 @@
     end
 end
 
+@testset "Issue #30006" begin
+    SparseMatrixCSC{Float64,Int32}(spzeros(3,3))[:, 1] == [1, 2, 3]
+end
+
 @testset "concatenation tests" begin
     sp33 = sparse(1.0I, 3, 3)
 
@@ -709,6 +713,8 @@
 
         @test ss116[:,:] == copy(ss116)
 
+        @test convert(SparseMatrixCSC{Float32,Int32}, sd116)[2:5,:] == convert(SparseMatrixCSC{Float32,Int32}, sd116[2:5,:])
+
         # range indexing
         @test Array(ss116[i,:]) == aa116[i,:]
         @test Array(ss116[:,j]) == aa116[:,j]
@@ -2307,4 +2313,16 @@
     @test m2.module == SparseArrays
 end
 
+@testset "unary operations on matrices where length(nzval)>nnz" begin
+    # this should create a sparse matrix with length(nzval)>nnz
+    A = SparseMatrixCSC(Complex{BigInt}[1+im 2+2im]')'[1:1, 2:2]
+    # ...ensure it does! If necessary, the test needs to be updated to use
+    # another mechanism to create a suitable A.
+    @assert length(A.nzval) > nnz(A)
+    @test -A == fill(-2-2im, 1, 1)
+    @test conj(A) == fill(2-2im, 1, 1)
+    conj!(A)
+    @test A == fill(2-2im, 1, 1)
+end
+
 end # module
diff -Nru julia-1.0.3+dfsg/stdlib/SuiteSparse/Project.toml julia-1.0.4+dfsg/stdlib/SuiteSparse/Project.toml
--- julia-1.0.3+dfsg/stdlib/SuiteSparse/Project.toml	2018-12-18 01:34:45.000000000 +0000
+++ julia-1.0.4+dfsg/stdlib/SuiteSparse/Project.toml	2019-05-16 03:38:24.000000000 +0000
@@ -4,13 +4,14 @@
 [deps]
 Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
 LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
+Serialization = "9e88b42a-f829-5b0c-bbe9-9e923198166b"
 SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
 
 [extras]
-Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
-Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
 DelimitedFiles = "8bb1440f-4735-579b-a4ab-409b98df4dab"
+Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
 Serialization = "9e88b42a-f829-5b0c-bbe9-9e923198166b"
+Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
 
 [targets]
 test = ["Test", "Random", "DelimitedFiles", "Serialization"]
diff -Nru julia-1.0.3+dfsg/stdlib/SuiteSparse/src/umfpack.jl julia-1.0.4+dfsg/stdlib/SuiteSparse/src/umfpack.jl
--- julia-1.0.3+dfsg/stdlib/SuiteSparse/src/umfpack.jl	2018-12-18 01:34:45.000000000 +0000
+++ julia-1.0.4+dfsg/stdlib/SuiteSparse/src/umfpack.jl	2019-05-16 03:38:24.000000000 +0000
@@ -11,6 +11,8 @@
 using SparseArrays
 import SparseArrays: nnz
 
+import Serialization: AbstractSerializer, deserialize
+
 import ..increment, ..increment!, ..decrement, ..decrement!
 
 include("umfpack_h.jl")
@@ -192,6 +194,22 @@
     F.numeric != C_NULL && print(io, '\n', F.numeric)
 end
 
+function deserialize(s::AbstractSerializer, t::Type{UmfpackLU{Tv,Ti}}) where {Tv,Ti}
+    symbolic = deserialize(s)
+    numeric  = deserialize(s)
+    m        = deserialize(s)
+    n        = deserialize(s)
+    colptr   = deserialize(s)
+    rowval   = deserialize(s)
+    nzval    = deserialize(s)
+    status   = deserialize(s)
+    obj      = UmfpackLU{Tv,Ti}(symbolic, numeric, m, n, colptr, rowval, nzval, status)
+
+    finalizer(umfpack_free_symbolic, obj)
+
+    return obj
+end
+
 ## Wrappers for UMFPACK functions
 
 # generate the name of the C function according to the value and integer types
diff -Nru julia-1.0.3+dfsg/stdlib/SuiteSparse/test/umfpack.jl julia-1.0.4+dfsg/stdlib/SuiteSparse/test/umfpack.jl
--- julia-1.0.3+dfsg/stdlib/SuiteSparse/test/umfpack.jl	2018-12-18 01:34:45.000000000 +0000
+++ julia-1.0.4+dfsg/stdlib/SuiteSparse/test/umfpack.jl	2019-05-16 03:38:24.000000000 +0000
@@ -1,6 +1,7 @@
 # This file is a part of Julia. License is MIT: https://julialang.org/license
 
 using SuiteSparse: increment!
+using Serialization
 using LinearAlgebra: Adjoint, Transpose, SingularException
 
 @testset "UMFPACK wrappers" begin
@@ -176,4 +177,16 @@
         end
     end
 
+    @testset "deserialization" begin
+        A  = 10*I + sprandn(10, 10, 0.4)
+        F1 = lu(A)
+        b  = IOBuffer()
+        serialize(b, F1)
+        seekstart(b)
+        F2 = deserialize(b)
+        for nm in (:colptr, :m, :n, :nzval, :rowval, :status)
+            @test getfield(F1, nm) == getfield(F2, nm)
+        end
+    end
+
 end
diff -Nru julia-1.0.3+dfsg/test/compiler/compiler.jl julia-1.0.4+dfsg/test/compiler/compiler.jl
--- julia-1.0.3+dfsg/test/compiler/compiler.jl	2018-12-18 01:34:45.000000000 +0000
+++ julia-1.0.4+dfsg/test/compiler/compiler.jl	2019-05-16 03:38:24.000000000 +0000
@@ -1822,6 +1822,15 @@
 end
 @test g15276() isa Vector{Int}
 
+function inbounds_30563()
+    local y
+    @inbounds for i in 1:10
+        y = (m->2i)(0)
+    end
+    return y
+end
+@test Base.return_types(inbounds_30563, ()) == Any[Int]
+
 # issue #27316 - inference shouldn't hang on these
 f27316(::Vector) = nothing
 f27316(::Any) = f27316(Any[][1]), f27316(Any[][1])
@@ -2068,3 +2077,24 @@
     val
 end
 @test Base.return_types(f29036, (String, Int)) == Any[Char]
+
+# issue #30394
+mutable struct Base30394
+    a::Int
+end
+
+mutable struct Foo30394
+    foo_inner::Base30394
+    Foo30394() = new(Base30394(1))
+end
+
+mutable struct Foo30394_2
+    foo_inner::Foo30394
+    Foo30394_2() = new(Foo30394())
+end
+
+f30394(foo::T1, ::Type{T2}) where {T2, T1 <: T2} = foo
+
+f30394(foo, T2) = f30394(foo.foo_inner, T2)
+
+@test Base.return_types(f30394, (Foo30394_2, Type{Base30394})) == Any[Base30394]
diff -Nru julia-1.0.3+dfsg/test/compiler/irpasses.jl julia-1.0.4+dfsg/test/compiler/irpasses.jl
--- julia-1.0.3+dfsg/test/compiler/irpasses.jl	1970-01-01 00:00:00.000000000 +0000
+++ julia-1.0.4+dfsg/test/compiler/irpasses.jl	2019-05-16 03:38:24.000000000 +0000
@@ -0,0 +1,51 @@
+# Tests for SROA
+
+mutable struct Foo30594; x::Float64; end
+Base.copy(x::Foo30594) = Foo30594(x.x)
+function add!(p::Foo30594, off::Foo30594)
+    p.x += off.x
+    return p
+end
+Base.:(+)(a::Foo30594, b::Foo30594) = add!(copy(a), b)
+
+let results = Float64[]
+    @noinline use30594(x) = push!(results, x.x); nothing
+    function foo30594(cnt::Int, dx::Int)
+        step = Foo30594(dx)
+        curr = step + Foo30594(1)
+        for i in 1:cnt
+            use30594(curr)
+            curr = curr + step
+        end
+        nothing
+    end
+
+    foo30594(4, -1)
+    @test results == [0.0, -1.0, -2.0, -3.0]
+end
+
+# Issue #29983
+# This one is a bit hard to trigger, but the key is to create a case
+# where SROA needs to introduce an intermediate type-unstable phi node
+struct Foo29983{T}
+    x::Tuple{T}
+end
+struct Bar29983{S}
+    x::S
+end
+Base.:+(a::T, b::Bar29983{S}) where {T, S} = Bar29983(a + b.x)
+Base.:+(a::Bar29983{S}, b::T) where {T, S} = b + a
+Base.:+(a::Bar29983{S}, b::Bar29983{T}) where {T, S} = Bar29983(a.x + b.x)
+Base.:+(a::Foo29983, b::Foo29983) = Foo29983((a.x[1] + b.x[1],))
+
+function f(x::Vector{T}) where {T}
+    x1 = Foo29983((x[1],))
+    la1 = Foo29983((x[1],))
+    f1 = Foo29983((0,))
+    for _ in 1:2
+        f1 += la1
+    end
+    return f1
+end
+
+@test f([Bar29983(1.0)]).x[1].x == 2.0
diff -Nru julia-1.0.3+dfsg/test/copy.jl julia-1.0.4+dfsg/test/copy.jl
--- julia-1.0.3+dfsg/test/copy.jl	2018-12-18 01:34:45.000000000 +0000
+++ julia-1.0.4+dfsg/test/copy.jl	2019-05-16 03:38:24.000000000 +0000
@@ -84,6 +84,9 @@
     @test c[1] === c[2]
 end
 
+# issue #30911
+@test deepcopy(Array{Int,N} where N) == Array{Int,N} where N
+
 # issue #14027
 struct Nullable14027{T}
     hasvalue::Bool
diff -Nru julia-1.0.3+dfsg/test/core.jl julia-1.0.4+dfsg/test/core.jl
--- julia-1.0.3+dfsg/test/core.jl	2018-12-18 01:34:45.000000000 +0000
+++ julia-1.0.4+dfsg/test/core.jl	2019-05-16 03:38:24.000000000 +0000
@@ -2432,6 +2432,20 @@
 g24460() = invoke(f24460, T24460, 1, 2)
 @test @inferred(g24460()) === 2.0
 
+# issue #30679
+@noinline function f30679(::DataType)
+    b = IOBuffer()
+    write(b, 0x00)
+    2
+end
+@noinline function f30679(t::Type{Int})
+    x = invoke(f30679, Tuple{DataType}, t)
+    b = IOBuffer()
+    write(b, 0x00)
+    return x + 40
+end
+@test f30679(Int) == 42
+
 call_lambda1() = (()->x)(1)
 call_lambda2() = ((x)->x)()
 call_lambda3() = ((x)->x)(1,2)
diff -Nru julia-1.0.3+dfsg/test/iterators.jl julia-1.0.4+dfsg/test/iterators.jl
--- julia-1.0.3+dfsg/test/iterators.jl	2018-12-18 01:34:45.000000000 +0000
+++ julia-1.0.4+dfsg/test/iterators.jl	2019-05-16 03:38:24.000000000 +0000
@@ -549,3 +549,27 @@
     @test ps isa Iterators.Pairs
     @test collect(ps) == [1 => :a, 2 => :b]
 end
+
+@testset "Stateful fix #30643" begin
+    @test Base.IteratorSize(1:10) isa Base.HasShape
+    a = Iterators.Stateful(1:10)
+    @test Base.IteratorSize(a) isa Base.HasLength
+    @test length(a) == 10
+    @test length(collect(a)) == 10
+    @test length(a) == 0
+    b = Iterators.Stateful(Iterators.take(1:10,3))
+    @test Base.IteratorSize(b) isa Base.HasLength
+    @test length(b) == 3
+    @test length(collect(b)) == 3
+    @test length(b) == 0
+    c = Iterators.Stateful(Iterators.countfrom(1))
+    @test Base.IteratorSize(c) isa Base.IsInfinite
+    @test length(Iterators.take(c,3)) == 3
+    @test length(collect(Iterators.take(c,3))) == 3
+    d = Iterators.Stateful(Iterators.filter(isodd,1:10))
+    @test Base.IteratorSize(d) isa Base.SizeUnknown
+    @test length(collect(Iterators.take(d,3))) == 3
+    @test length(collect(d)) == 2
+    @test length(collect(d)) == 0
+end
+
diff -Nru julia-1.0.3+dfsg/test/keywordargs.jl julia-1.0.4+dfsg/test/keywordargs.jl
--- julia-1.0.3+dfsg/test/keywordargs.jl	2018-12-18 01:34:45.000000000 +0000
+++ julia-1.0.4+dfsg/test/keywordargs.jl	2019-05-16 03:38:24.000000000 +0000
@@ -117,6 +117,17 @@
     @test kwf7(1.5;k=2.5) === Float64
     @test_throws MethodError kwf7(1.5)
     @test_throws TypeError kwf7(1.5; k=2)
+
+    # issue #30792
+    g30792(a::C; b=R(1)) where {R <: Real, C <: Union{R, Complex{R}}} = R
+    @test g30792(1.0) === Float64
+    @test g30792(1.0im) === Float64
+    @test g30792(1.0im, b=1) === Float64
+    @test_throws MethodError g30792("")
+    f30792(a::C; b::R=R(1)) where {R <: Real, C <: Union{R, Complex{R}}} = R
+    @test f30792(2im) === Int
+    @test f30792(2im, b=3) === Int
+    @test_throws TypeError f30792(2im, b=3.0)
 end
 # try to confuse it with quoted symbol
 kwf8(x::MIME{:T};k::T=0) where {T} = 0
diff -Nru julia-1.0.3+dfsg/test/offsetarray.jl julia-1.0.4+dfsg/test/offsetarray.jl
--- julia-1.0.3+dfsg/test/offsetarray.jl	2018-12-18 01:34:45.000000000 +0000
+++ julia-1.0.4+dfsg/test/offsetarray.jl	2019-05-16 03:38:24.000000000 +0000
@@ -203,6 +203,8 @@
 cmp_showf(Base.print_matrix, io, OffsetArray(rand(5,10^3), (10,-9)))    # rows fit
 cmp_showf(Base.print_matrix, io, OffsetArray(rand(10^3,10^3), (10,-9))) # neither fits
 cmp_showf(Base.print_matrix, io, OffsetArray(reshape(range(-0.212121212121, stop=2/11, length=3*29), 3, 29), (-2, -15)); options=(:displaysize=>(53,210),))
+cmp_showf(show, io, OffsetArray(collect(1:100), (100,)))   # issue #31641
+
 targets1 = ["0-dimensional $OAs_name.OffsetArray{Float64,0,Array{Float64,0}}:\n1.0",
             "$OAs_name.OffsetArray{Float64,1,Array{Float64,1}} with indices 2:2:\n 1.0",
             "$OAs_name.OffsetArray{Float64,2,Array{Float64,2}} with indices 2:2×3:3:\n 1.0",
diff -Nru julia-1.0.3+dfsg/test/parse.jl julia-1.0.4+dfsg/test/parse.jl
--- julia-1.0.3+dfsg/test/parse.jl	2018-12-18 01:34:45.000000000 +0000
+++ julia-1.0.4+dfsg/test/parse.jl	2019-05-16 03:38:24.000000000 +0000
@@ -268,8 +268,8 @@
 
 # parsing complex numbers (#22250)
 @testset "complex parsing" begin
-    for r in (1,0,-1), i in (1,0,-1), sign in ('-','+'), Im in ("i","j","im")
-        for s1 in (""," "), s2 in (""," "), s3 in (""," "), s4 in (""," ")
+    for sign in ('-','+'), Im in ("i","j","im"), s1 in (""," "), s2 in (""," "), s3 in (""," "), s4 in (""," ")
+        for r in (1,0,-1), i in (1,0,-1),
             n = Complex(r, sign == '+' ? i : -i)
             s = string(s1, r, s2, sign, s3, i, Im, s4)
             @test n === parse(Complex{Int}, s)
@@ -283,6 +283,13 @@
                 @test n*parse(T,"1e-3") == parse(Complex{T}, string(s1, r, "e-3", s2, sign, s3, i, "e-3", Im, s4))
             end
         end
+        for r in (-1.0,-1e-9,Inf,-Inf,NaN), i in (-1.0,-1e-9,Inf,NaN)
+            n = Complex(r, sign == '+' ? i : -i)
+            s = lowercase(string(s1, r, s2, sign, s3, i, Im, s4))
+            @test n === parse(ComplexF64, s)
+            @test Complex(r) === parse(ComplexF64, string(s1, r, s2))
+            @test Complex(0,i) === parse(ComplexF64, string(s3, i, Im, s4))
+        end
     end
     @test parse(Complex{Float16}, "3.3+4i") === Complex{Float16}(3.3+4im)
     @test parse(Complex{Int}, SubString("xxxxxx1+2imxxxx", 7, 10)) === 1+2im
@@ -311,3 +318,10 @@
     @test eltype([tryparse(Float64, s) for s in String[]]) == Union{Nothing, Float64}
     @test eltype([tryparse(Complex{Int}, s) for s in String[]]) == Union{Nothing, Complex{Int}}
 end
+
+@testset "inf and nan parsing" begin
+    for (v,vs) in ((NaN,"nan"), (Inf,"inf"), (Inf,"infinity")), sbefore in ("", "  "), safter in ("", "  "), sign in (+, -), case in (lowercase, uppercase)
+        s = case(string(sbefore, sign, vs, safter))
+        @test isequal(parse(Float64, s), sign(v))
+    end
+end
diff -Nru julia-1.0.3+dfsg/test/precompile.jl julia-1.0.4+dfsg/test/precompile.jl
--- julia-1.0.3+dfsg/test/precompile.jl	2018-12-18 01:34:45.000000000 +0000
+++ julia-1.0.4+dfsg/test/precompile.jl	2019-05-16 03:38:24.000000000 +0000
@@ -744,5 +744,27 @@
     end
 end
 
+# issue #29936
+let
+    load_path = mktempdir()
+    load_cache_path = mktempdir()
+    try
+        write(joinpath(load_path, "Foo29936.jl"),
+              """
+              module Foo29936
+              const global m = Val{nothing}()
+              const global h = Val{:hey}()
+              wab = [("a", m), ("b", h),]
+              end
+              """)
+        pushfirst!(LOAD_PATH, load_path)
+        pushfirst!(DEPOT_PATH, load_cache_path)
+        @eval using Foo29936
+        @test [("Plan", Foo29936.m), ("Plan", Foo29936.h),] isa Vector{Tuple{String,Val}}
+    finally
+        rm(load_path, recursive=true)
+        rm(load_cache_path, recursive=true)
+    end
+end
 
 end # !withenv
diff -Nru julia-1.0.3+dfsg/test/ranges.jl julia-1.0.4+dfsg/test/ranges.jl
--- julia-1.0.3+dfsg/test/ranges.jl	2018-12-18 01:34:45.000000000 +0000
+++ julia-1.0.4+dfsg/test/ranges.jl	2019-05-16 03:38:24.000000000 +0000
@@ -1406,6 +1406,20 @@
     @test @inferred(z4 .+ z4) === z4
 end
 
+@testset "Issue #30006" begin
+    @test Base.Slice(Base.OneTo(5))[Int32(1)] == Int32(1)
+    @test Base.Slice(Base.OneTo(3))[Int8(2)] == Int8(2)
+    @test Base.Slice(1:10)[Int32(2)] == Int32(2)
+    @test Base.Slice(1:10)[Int8(2)] == Int8(2)
+end
+
+@testset "Issue #30006" begin
+    @test Base.Slice(Base.OneTo(5))[Int32(1)] == Int32(1)
+    @test Base.Slice(Base.OneTo(3))[Int8(2)] == Int8(2)
+    @test Base.Slice(1:10)[Int32(2)] == Int32(2)
+    @test Base.Slice(1:10)[Int8(2)] == Int8(2)
+end
+
 @testset "allocation of TwicePrecision call" begin
     0:286.493442:360
     0:286:360
diff -Nru julia-1.0.3+dfsg/test/reinterpretarray.jl julia-1.0.4+dfsg/test/reinterpretarray.jl
--- julia-1.0.3+dfsg/test/reinterpretarray.jl	2018-12-18 01:34:45.000000000 +0000
+++ julia-1.0.4+dfsg/test/reinterpretarray.jl	2019-05-16 03:38:24.000000000 +0000
@@ -160,3 +160,22 @@
     r = reinterpret(Int, vt)
     @test r == OffsetArray(reshape(1:8, 2, 2, 2), (0, offsetvt...))
 end
+
+@testset "potentially aliased copies" begin
+    buffer = UInt8[1,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0]
+    mid = length(buffer) ÷ 2
+    x1 = reinterpret(Int64, @view buffer[1:mid])
+    x2 = reinterpret(Int64, @view buffer[mid+1:end])
+    x1 .= x2
+    @test x1 == x2 == [2]
+    @test x1[] === x2[] === Int64(2)
+end
+
+# Test 0-dimensional Arrays
+A = zeros(UInt32)
+B = reinterpret(Int32,A)
+@test size(B) == ()
+@test axes(B) == ()
+B[] = Int32(5)
+@test B[] === Int32(5)
+@test A[] === UInt32(5)
diff -Nru julia-1.0.3+dfsg/test/sets.jl julia-1.0.4+dfsg/test/sets.jl
--- julia-1.0.3+dfsg/test/sets.jl	2018-12-18 01:34:45.000000000 +0000
+++ julia-1.0.4+dfsg/test/sets.jl	2019-05-16 03:38:24.000000000 +0000
@@ -613,6 +613,27 @@
     end
 end
 
+@testset "optimized union! with max_values" begin
+    # issue #30315
+    T = Union{Nothing, Bool}
+    @test Base.max_values(T) == 3
+    d = Set{T}()
+    union!(d, (nothing, true, false))
+    @test length(d) == 3
+    @test d == Set((nothing, true, false))
+    @test nothing in d
+    @test true    in d
+    @test false   in d
+
+    for X = (Int8, Int16, Int32, Int64)
+        @test Base.max_values(Union{Nothing, X}) == (sizeof(X) < sizeof(Int) ?
+                                                     2^(8*sizeof(X)) + 1 :
+                                                     typemax(Int))
+    end
+    # this does not account for non-empty intersections of the unioned types
+    @test Base.max_values(Union{Int8,Int16}) == 2^8 + 2^16
+end
+
 struct OpenInterval{T}
     lower::T
     upper::T
diff -Nru julia-1.0.3+dfsg/test/strings/util.jl julia-1.0.4+dfsg/test/strings/util.jl
--- julia-1.0.3+dfsg/test/strings/util.jl	2018-12-18 01:34:45.000000000 +0000
+++ julia-1.0.4+dfsg/test/strings/util.jl	2019-05-16 03:38:24.000000000 +0000
@@ -301,6 +301,7 @@
     @test chomp("foo\r\n") == "foo"
     @test chomp("fo∀\r\n") == "fo∀"
     @test chomp("fo∀") == "fo∀"
+    @test chop("") == ""
     @test chop("fooε") == "foo"
     @test chop("foεo") == "foε"
     @test chop("∃∃∃∃") == "∃∃∃"
diff -Nru julia-1.0.3+dfsg/.travis.yml julia-1.0.4+dfsg/.travis.yml
--- julia-1.0.3+dfsg/.travis.yml	2018-12-18 01:34:45.000000000 +0000
+++ julia-1.0.4+dfsg/.travis.yml	2019-05-16 03:38:24.000000000 +0000
@@ -40,7 +40,7 @@
             - gfortran-5
     - os: osx
       env: ARCH="x86_64"
-      osx_image: xcode8
+      osx_image: xcode8.3
 cache: ccache
 branches:
   only:
diff -Nru julia-1.0.3+dfsg/VERSION julia-1.0.4+dfsg/VERSION
--- julia-1.0.3+dfsg/VERSION	2018-12-18 01:34:45.000000000 +0000
+++ julia-1.0.4+dfsg/VERSION	2019-05-16 03:38:24.000000000 +0000
@@ -1 +1 @@
-1.0.3
+1.0.4
