Sync from rust 56ee85274e
This commit is contained in:
commit
954dfd1198
4 changed files with 58 additions and 56 deletions
|
|
@ -10,103 +10,103 @@ pushd rust
|
|||
|
||||
command -v rg >/dev/null 2>&1 || cargo install ripgrep
|
||||
|
||||
rm -r src/test/ui/{extern/,unsized-locals/,lto/,linkage*} || true
|
||||
for test in $(rg --files-with-matches "lto|// needs-asm-support|// needs-unwind" src/test/{codegen-units,ui,incremental}); do
|
||||
rm -r tests/ui/{extern/,unsized-locals/,lto/,linkage*} || true
|
||||
for test in $(rg --files-with-matches "lto|// needs-asm-support|// needs-unwind" tests/{codegen-units,ui,incremental}); do
|
||||
rm $test
|
||||
done
|
||||
|
||||
for test in $(rg -i --files-with-matches "//(\[\w+\])?~[^\|]*\s*ERR|// error-pattern:|// build-fail|// run-fail|-Cllvm-args" src/test/ui); do
|
||||
for test in $(rg -i --files-with-matches "//(\[\w+\])?~[^\|]*\s*ERR|// error-pattern:|// build-fail|// run-fail|-Cllvm-args" tests/ui); do
|
||||
rm $test
|
||||
done
|
||||
|
||||
git checkout -- src/test/ui/issues/auxiliary/issue-3136-a.rs # contains //~ERROR, but shouldn't be removed
|
||||
git checkout -- src/test/ui/proc-macro/pretty-print-hack/
|
||||
git checkout -- tests/ui/issues/auxiliary/issue-3136-a.rs # contains //~ERROR, but shouldn't be removed
|
||||
git checkout -- tests/ui/proc-macro/pretty-print-hack/
|
||||
|
||||
# missing features
|
||||
# ================
|
||||
|
||||
# requires stack unwinding
|
||||
rm src/test/incremental/change_crate_dep_kind.rs
|
||||
rm src/test/incremental/issue-80691-bad-eval-cache.rs # -Cpanic=abort causes abort instead of exit(101)
|
||||
rm tests/incremental/change_crate_dep_kind.rs
|
||||
rm tests/incremental/issue-80691-bad-eval-cache.rs # -Cpanic=abort causes abort instead of exit(101)
|
||||
|
||||
# requires compiling with -Cpanic=unwind
|
||||
rm -r src/test/ui/macros/rfc-2011-nicer-assert-messages/
|
||||
rm -r src/test/run-make/test-benches
|
||||
rm src/test/ui/test-attrs/test-type.rs
|
||||
rm -r tests/ui/macros/rfc-2011-nicer-assert-messages/
|
||||
rm -r tests/run-make/test-benches
|
||||
rm tests/ui/test-attrs/test-type.rs
|
||||
|
||||
# vendor intrinsics
|
||||
rm src/test/ui/sse2.rs # cpuid not supported, so sse2 not detected
|
||||
rm src/test/ui/intrinsics/const-eval-select-x86_64.rs # requires x86_64 vendor intrinsics
|
||||
rm src/test/ui/simd/array-type.rs # "Index argument for `simd_insert` is not a constant"
|
||||
rm src/test/ui/simd/intrinsic/float-math-pass.rs # simd_fcos unimplemented
|
||||
rm tests/ui/sse2.rs # cpuid not supported, so sse2 not detected
|
||||
rm tests/ui/intrinsics/const-eval-select-x86_64.rs # requires x86_64 vendor intrinsics
|
||||
rm tests/ui/simd/array-type.rs # "Index argument for `simd_insert` is not a constant"
|
||||
rm tests/ui/simd/intrinsic/float-math-pass.rs # simd_fcos unimplemented
|
||||
|
||||
# exotic linkages
|
||||
rm src/test/ui/issues/issue-33992.rs # unsupported linkages
|
||||
rm src/test/incremental/hashes/function_interfaces.rs # same
|
||||
rm src/test/incremental/hashes/statics.rs # same
|
||||
rm tests/ui/issues/issue-33992.rs # unsupported linkages
|
||||
rm tests/incremental/hashes/function_interfaces.rs # same
|
||||
rm tests/incremental/hashes/statics.rs # same
|
||||
|
||||
# variadic arguments
|
||||
rm src/test/ui/abi/mir/mir_codegen_calls_variadic.rs # requires float varargs
|
||||
rm src/test/ui/abi/variadic-ffi.rs # requires callee side vararg support
|
||||
rm tests/ui/abi/mir/mir_codegen_calls_variadic.rs # requires float varargs
|
||||
rm tests/ui/abi/variadic-ffi.rs # requires callee side vararg support
|
||||
|
||||
# unsized locals
|
||||
rm -r src/test/run-pass-valgrind/unsized-locals
|
||||
rm -r tests/run-pass-valgrind/unsized-locals
|
||||
|
||||
# misc unimplemented things
|
||||
rm src/test/ui/intrinsics/intrinsic-nearby.rs # unimplemented nearbyintf32 and nearbyintf64 intrinsics
|
||||
rm src/test/ui/target-feature/missing-plusminus.rs # error not implemented
|
||||
rm src/test/ui/fn/dyn-fn-alignment.rs # wants a 256 byte alignment
|
||||
rm -r src/test/run-make/emit-named-files # requires full --emit support
|
||||
rm -r src/test/run-make/repr128-dwarf # debuginfo test
|
||||
rm tests/ui/intrinsics/intrinsic-nearby.rs # unimplemented nearbyintf32 and nearbyintf64 intrinsics
|
||||
rm tests/ui/target-feature/missing-plusminus.rs # error not implemented
|
||||
rm tests/ui/fn/dyn-fn-alignment.rs # wants a 256 byte alignment
|
||||
rm -r tests/run-make/emit-named-files # requires full --emit support
|
||||
rm -r tests/run-make/repr128-dwarf # debuginfo test
|
||||
|
||||
# optimization tests
|
||||
# ==================
|
||||
rm src/test/ui/codegen/issue-28950.rs # depends on stack size optimizations
|
||||
rm src/test/ui/codegen/init-large-type.rs # same
|
||||
rm src/test/ui/issues/issue-40883.rs # same
|
||||
rm -r src/test/run-make/fmt-write-bloat/ # tests an optimization
|
||||
rm tests/ui/codegen/issue-28950.rs # depends on stack size optimizations
|
||||
rm tests/ui/codegen/init-large-type.rs # same
|
||||
rm tests/ui/issues/issue-40883.rs # same
|
||||
rm -r tests/run-make/fmt-write-bloat/ # tests an optimization
|
||||
|
||||
# backend specific tests
|
||||
# ======================
|
||||
rm src/test/incremental/thinlto/cgu_invalidated_when_import_{added,removed}.rs # requires LLVM
|
||||
rm src/test/ui/abi/stack-protector.rs # requires stack protector support
|
||||
rm tests/incremental/thinlto/cgu_invalidated_when_import_{added,removed}.rs # requires LLVM
|
||||
rm tests/ui/abi/stack-protector.rs # requires stack protector support
|
||||
|
||||
# giving different but possibly correct results
|
||||
# =============================================
|
||||
rm src/test/ui/mir/mir_misc_casts.rs # depends on deduplication of constants
|
||||
rm src/test/ui/mir/mir_raw_fat_ptr.rs # same
|
||||
rm src/test/ui/consts/issue-33537.rs # same
|
||||
rm src/test/ui/layout/valid_range_oob.rs # different ICE message
|
||||
rm tests/ui/mir/mir_misc_casts.rs # depends on deduplication of constants
|
||||
rm tests/ui/mir/mir_raw_fat_ptr.rs # same
|
||||
rm tests/ui/consts/issue-33537.rs # same
|
||||
rm tests/ui/layout/valid_range_oob.rs # different ICE message
|
||||
|
||||
# doesn't work due to the way the rustc test suite is invoked.
|
||||
# should work when using ./x.py test the way it is intended
|
||||
# ============================================================
|
||||
rm -r src/test/run-make/emit-shared-files # requires the rustdoc executable in dist/bin/
|
||||
rm -r src/test/run-make/unstable-flag-required # same
|
||||
rm -r src/test/run-make/rustdoc-* # same
|
||||
rm -r src/test/run-make/issue-88756-default-output # same
|
||||
rm -r src/test/run-make/remap-path-prefix-dwarf # requires llvm-dwarfdump
|
||||
rm -r src/test/ui/consts/missing_span_in_backtrace.rs # expects sysroot source to be elsewhere
|
||||
rm -r tests/run-make/emit-shared-files # requires the rustdoc executable in dist/bin/
|
||||
rm -r tests/run-make/unstable-flag-required # same
|
||||
rm -r tests/run-make/rustdoc-* # same
|
||||
rm -r tests/run-make/issue-88756-default-output # same
|
||||
rm -r tests/run-make/remap-path-prefix-dwarf # requires llvm-dwarfdump
|
||||
rm -r tests/ui/consts/missing_span_in_backtrace.rs # expects sysroot source to be elsewhere
|
||||
|
||||
# genuine bugs
|
||||
# ============
|
||||
rm src/test/incremental/spike-neg1.rs # errors out for some reason
|
||||
rm src/test/incremental/spike-neg2.rs # same
|
||||
rm tests/incremental/spike-neg1.rs # errors out for some reason
|
||||
rm tests/incremental/spike-neg2.rs # same
|
||||
|
||||
rm src/test/ui/simd/intrinsic/generic-reduction-pass.rs # simd_reduce_add_unordered doesn't accept an accumulator for integer vectors
|
||||
rm tests/ui/simd/intrinsic/generic-reduction-pass.rs # simd_reduce_add_unordered doesn't accept an accumulator for integer vectors
|
||||
|
||||
rm src/test/ui/simd/intrinsic/generic-as.rs # crash when accessing vector type filed (#1318)
|
||||
rm src/test/ui/simd/simd-bitmask.rs # crash
|
||||
rm tests/ui/simd/intrinsic/generic-as.rs # crash when accessing vector type filed (#1318)
|
||||
rm tests/ui/simd/simd-bitmask.rs # crash
|
||||
|
||||
# bugs in the test suite
|
||||
# ======================
|
||||
rm src/test/ui/backtrace.rs # TODO warning
|
||||
rm src/test/ui/simple_global_asm.rs # TODO add needs-asm-support
|
||||
rm src/test/ui/process/nofile-limit.rs # TODO some AArch64 linking issue
|
||||
rm src/test/ui/dyn-star/dispatch-on-pin-mut.rs # TODO failed assertion in vtable::get_ptr_and_method_ref
|
||||
rm tests/ui/backtrace.rs # TODO warning
|
||||
rm tests/ui/simple_global_asm.rs # TODO add needs-asm-support
|
||||
rm tests/ui/process/nofile-limit.rs # TODO some AArch64 linking issue
|
||||
rm tests/ui/dyn-star/dispatch-on-pin-mut.rs # TODO failed assertion in vtable::get_ptr_and_method_ref
|
||||
|
||||
rm src/test/ui/stdio-is-blocking.rs # really slow with unoptimized libstd
|
||||
rm tests/ui/stdio-is-blocking.rs # really slow with unoptimized libstd
|
||||
|
||||
echo "[TEST] rustc test suite"
|
||||
RUST_TEST_NOCAPTURE=1 COMPILETEST_FORCE_STAGE0=1 ./x.py test --stage 0 src/test/{codegen-units,run-make,run-pass-valgrind,ui,incremental}
|
||||
RUST_TEST_NOCAPTURE=1 COMPILETEST_FORCE_STAGE0=1 ./x.py test --stage 0 tests/{codegen-units,run-make,run-pass-valgrind,ui,incremental}
|
||||
popd
|
||||
|
|
|
|||
|
|
@ -304,7 +304,7 @@ fn data_id_for_static(
|
|||
|
||||
// Comment copied from https://github.com/rust-lang/rust/blob/45060c2a66dfd667f88bd8b94261b28a58d85bd5/src/librustc_codegen_llvm/consts.rs#L141
|
||||
// Declare an internal global `extern_with_linkage_foo` which
|
||||
// is initialized with the address of `foo`. If `foo` is
|
||||
// is initialized with the address of `foo`. If `foo` is
|
||||
// discarded during linking (for example, if `foo` has weak
|
||||
// linkage and there are no definitions), then
|
||||
// `extern_with_linkage_foo` will instead be initialized to
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ impl DebugContext {
|
|||
.working_dir
|
||||
.to_string_lossy(FileNameDisplayPreference::Remapped)
|
||||
.into_owned();
|
||||
let (name, file_info) = match tcx.sess.local_crate_source_file.clone() {
|
||||
let (name, file_info) = match tcx.sess.local_crate_source_file() {
|
||||
Some(path) => {
|
||||
let name = path.to_string_lossy().into_owned();
|
||||
(name, None)
|
||||
|
|
|
|||
|
|
@ -643,7 +643,7 @@ fn codegen_regular_intrinsic_call<'tcx>(
|
|||
let res = CValue::by_val(res, arg.layout());
|
||||
ret.write_cvalue(fx, res);
|
||||
}
|
||||
sym::assert_inhabited | sym::assert_zero_valid | sym::assert_uninit_valid => {
|
||||
sym::assert_inhabited | sym::assert_zero_valid | sym::assert_mem_uninitialized_valid => {
|
||||
intrinsic_args!(fx, args => (); intrinsic);
|
||||
|
||||
let layout = fx.layout_of(substs.type_at(0));
|
||||
|
|
@ -672,7 +672,9 @@ fn codegen_regular_intrinsic_call<'tcx>(
|
|||
return;
|
||||
}
|
||||
|
||||
if intrinsic == sym::assert_uninit_valid && !fx.tcx.permits_uninit_init(layout) {
|
||||
if intrinsic == sym::assert_mem_uninitialized_valid
|
||||
&& !fx.tcx.permits_uninit_init(layout)
|
||||
{
|
||||
with_no_trimmed_paths!({
|
||||
crate::base::codegen_panic(
|
||||
fx,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue