rust/src/test/codegen
bors 8928de7439 Auto merge of #52972 - RalfJung:from_raw_parts_align, r=alexcrichton
debug_assert to ensure that from_raw_parts is only used properly aligned

This does not help nearly as much as I would hope because everybody uses the distributed libstd which is compiled without debug assertions. For this reason, I am not sure if this is even worth it. OTOH, this would have caught the misalignment fixed by https://github.com/rust-lang/rust/issues/42789 *if* there had been any tests actually using ZSTs with alignment >1 (we have a CI runner which has debug assertions in libstd enabled), and it seems to currently [fail in the rg testsuite](https://ci.appveyor.com/project/rust-lang/rust/build/1.0.8403/job/v7dfdcgn8ay5j6sb). So maybe it is worth it, after all.

I have seen the attribute `#[rustc_inherit_overflow_checks]` in some places, does that make it so that the *caller's* debug status is relevant? Is there a similar attribute for `debug_assert!`? That could even subsume `rustc_inherit_overflow_checks`: Something like `rustc_inherit_debug_flag` could affect *all* places that change the generated code depending on whether we are in debug or release mode. In fact, given that we have to keep around the MIR for generic functions anyway, is there ever a reason *not* to handle the debug flag that way? I guess currently we apply debug flags like `cfg` so this is dropped early during the MIR pipeline?

EDIT: I learned from @eddyb that because of how `debug_assert!` works, this is not realistic. Well, we could still have it for the rustc CI runs and then maybe, eventually, when libstd gets compiled client-side and there is both a debug and a release build... then this will also benefit users.^^
2018-08-19 09:40:36 +00:00
..
auxiliary rustc: Add LLVM nounwind with -C panic=abort 2017-10-11 09:05:38 -07:00
dllimports Add 'ignore-cloudabi' to tests that don't and won't build on CloudABI. 2018-01-02 14:11:41 +01:00
remap_path_prefix Make globals with private linkage unnamed. Fixes #50862. 2018-07-31 23:45:18 -04:00
abi-main-signature-16bit-c-int.rs test: Ignore some problematic tests on sparc and sparc64 2018-06-04 23:59:40 +02:00
abi-main-signature-32bit-c-int.rs rustc: Use 16bit c_int for msp430 2017-09-30 16:30:12 +02:00
abi-sysv64.rs Stabilize abi_sysv64 2017-12-06 01:19:35 +01:00
abi-x86-interrupt.rs Remove two obsolete min-llvm-version tests 2017-10-18 07:54:35 -07:00
abi-x86_64_sysv.rs Fix oversized loads on x86_64 SysV FFI calls 2018-02-08 13:50:18 +01:00
adjustments.rs rustc: encode scalar pairs in layout ABI. 2017-11-19 02:43:32 +02:00
align-struct.rs Upgrade to LLVM's master branch (LLVM 7) 2018-07-10 13:43:01 -07:00
alloc-optimisation.rs Add a no-system-llvm compilecheck header 2017-06-15 19:11:55 +03:00
call-metadata.rs bump minimum LLVM version to 5.0 2018-07-09 11:35:52 +02:00
coercions.rs Disable old trans access via -Z orbit, #[rustc_no_mir] or --disable-orbit. 2016-08-24 13:23:37 +03:00
consts.rs Make globals with private linkage unnamed. Fixes #50862. 2018-07-31 23:45:18 -04:00
dealloc-no-unwind.rs std: Mark allocation functions as nounwind 2017-08-28 08:06:52 -07:00
drop.rs Update test/codegen/drop.rs to reflect inconsequential change in basic block ordering. 2017-06-12 13:06:42 +02:00
enum-bounds-check.rs emit an assume that cast-from enums are in range 2016-10-05 14:12:30 +03:00
exact_div.rs Add a codegen test for exact_div intrinsic 2018-03-23 23:47:22 -07:00
extern-functions.rs make #[unwind] attribute specify expectations more clearly 2018-02-20 19:12:52 -05:00
fastcall-inreg.rs test: Ignore some problematic tests on sparc and sparc64 2018-06-04 23:59:40 +02:00
fatptr.rs Avoid FCA loads and extractvalue when copying fat pointers 2015-11-20 21:42:13 +01:00
float_math.rs Fix typo in codegen test 2017-10-07 18:04:23 +02:00
foo.s Add global_asm tests 2017-04-12 19:12:50 -05:00
force-frame-pointers.rs Rework force-frame-pointer 2018-05-01 10:44:44 +03:00
function-arguments.rs dont hardcode vtable size in codegen test 2018-07-29 20:24:26 +02:00
gdb_debug_script_load.rs Avoid loading the whole gdb debug scripts section. 2015-09-21 15:43:52 -05:00
global_asm.rs Revert "Remove useless powerpc64 entry from ARCH_TABLE, closes #47737" 2018-03-19 01:34:32 +00:00
global_asm_include.rs Revert "Remove useless powerpc64 entry from ARCH_TABLE, closes #47737" 2018-03-19 01:34:32 +00:00
global_asm_x2.rs Revert "Remove useless powerpc64 entry from ARCH_TABLE, closes #47737" 2018-03-19 01:34:32 +00:00
internalize-closures.rs Add codegen test to make sure that closures are 'internalized' properly. 2016-07-19 06:22:35 -04:00
intrinsic-no-unnamed-attr.rs Don't add unnamed address attributes to intrinsics. 2015-09-06 19:26:41 -05:00
issue-15953.rs Add tests for issues with the 'E-needtest' label. 2017-03-07 14:01:19 +09:00
issue-32031.rs rustc: unpack scalar newtype layout ABIs. 2017-11-19 02:43:55 +02:00
issue-32364.rs adapt tests 2016-10-25 19:56:36 +02:00
issue-34947-pow-i32.rs add test for not optimized pow with constant power 2017-09-02 19:10:00 +03:00
issue-37945.rs bump minimum LLVM version to 5.0 2018-07-09 11:35:52 +02:00
issue-44056-macos-tls-align.rs Do not allow LLVM to increase a TLS's alignment on macOS. 2018-06-30 21:36:03 +08:00
issue-45222.rs Change RangeInclusive to a three-field struct. 2018-07-13 09:53:36 +08:00
issue-45466.rs bump llvm version of failing codegen test 2018-07-09 11:35:53 +02:00
issue-47278.rs Compute LLVM argument indices correctly in face of padding 2018-01-16 12:49:38 +01:00
issue-47442.rs remove noop landing pads in cleanup shims 2018-01-16 00:07:06 +02:00
lifetime_start_end.rs Ensure StorageDead is created even if variable initialization fails 2018-07-12 10:13:41 -07:00
likely.rs core: add likely and unlikely intrinsics 2016-09-02 10:29:32 -07:00
link-dead-code.rs Generate code for const- and inline-fns if -Clink-dead-code is specified. 2018-01-04 10:12:20 +01:00
link_section.rs Ensure that statics are always ByRef 2018-05-19 14:24:24 +02:00
loads.rs Disable old trans access via -Z orbit, #[rustc_no_mir] or --disable-orbit. 2016-08-24 13:23:37 +03:00
local-generics-in-exe-internalized.rs Make sure that generics are internalized in executables even with -Zshare-generics 2018-04-06 12:14:08 +02:00
lto-removes-invokes.rs rustc: Implement custom panic runtimes 2016-05-09 08:22:36 -07:00
mainsubprogram.rs bump minimum LLVM version to 5.0 2018-07-09 11:35:52 +02:00
mainsubprogramstart.rs bump minimum LLVM version to 5.0 2018-07-09 11:35:52 +02:00
match-optimizes-away.rs Don't glob-import overlapping variant names in test/codegen/match-optimizes-away.rs. 2017-11-19 09:12:10 +02:00
match.rs rustc_mir: always run the deaggregator. 2018-02-20 02:50:26 +02:00
mir_zst_stores.rs Update codegen tests. 2017-11-07 08:54:38 +01:00
move-val-init.rs Avoid unnecessary copies of arguments that are simple bindings 2017-10-26 12:54:34 +02:00
naked-functions.rs Update codegen tests. 2017-11-07 08:54:38 +01:00
no-assumes-on-casts.rs Do not generate assumes for plain integer casts 2018-08-12 18:38:46 +03:00
no-dllimport-w-cross-lang-lto.rs Address review comments for #53031 and fix some merge fallout. 2018-08-08 13:40:23 +02:00
no-output-asm-is-volatile.rs Make inline assembly volatile if it has no outputs. Fixes #46026 2018-02-05 15:56:44 +01:00
nontemporal.rs rustc: Add support for some more x86 SIMD ops 2017-11-25 11:03:13 -08:00
noreturnflag.rs bump minimum LLVM version to 5.0 2018-07-09 11:35:52 +02:00
nounwind.rs rustc: Always emit uwtable on Android 2018-04-21 08:38:44 -07:00
packed.rs Upgrade to LLVM's master branch (LLVM 7) 2018-07-10 13:43:01 -07:00
panic-abort-windows.rs Add 'ignore-cloudabi' to tests that don't and won't build on CloudABI. 2018-01-02 14:11:41 +01:00
personality_lifetimes.rs remove cleanup branches to the resume block 2017-04-22 21:00:50 +03:00
prefetch.rs Remove excessive trailing newlines. 2017-12-30 15:50:52 +08:00
refs.rs rustc: unpack scalar pair newtype layout ABIs. 2017-11-19 02:43:55 +02:00
repeat-trusted-len.rs Upgrade to LLVM's master branch (LLVM 7) 2018-07-10 13:43:01 -07:00
repr-transparent-aggregates-1.rs Stabilize #[repr(transparent)] 2018-06-12 06:49:07 +02:00
repr-transparent-aggregates-2.rs test: Ignore some problematic tests on powerpc and powerpc64* 2018-06-17 12:00:47 +02:00
repr-transparent-aggregates-3.rs Stabilize #[repr(transparent)] 2018-06-12 06:49:07 +02:00
repr-transparent-sysv64.rs Stabilize #[repr(transparent)] 2018-06-12 06:49:07 +02:00
repr-transparent.rs Stabilize #[repr(transparent)] 2018-06-12 06:49:07 +02:00
scalar-pair-bool.rs Update scalar pairs per review comments 2018-07-05 14:22:09 -07:00
simd-intrinsic-float-abs.rs enable fast-math flags 2018-05-24 16:04:39 +02:00
simd-intrinsic-float-ceil.rs enable fast-math flags 2018-05-24 16:04:39 +02:00
simd-intrinsic-float-cos.rs enable fast-math flags 2018-05-24 16:04:39 +02:00
simd-intrinsic-float-exp.rs enable fast-math flags 2018-05-24 16:04:39 +02:00
simd-intrinsic-float-exp2.rs enable fast-math flags 2018-05-24 16:04:39 +02:00
simd-intrinsic-float-floor.rs enable fast-math flags 2018-05-24 16:04:39 +02:00
simd-intrinsic-float-fma.rs enable fast-math flags 2018-05-24 16:04:39 +02:00
simd-intrinsic-float-fsqrt.rs enable fast-math flags 2018-05-24 16:04:39 +02:00
simd-intrinsic-float-log.rs enable fast-math flags 2018-05-24 16:04:39 +02:00
simd-intrinsic-float-log2.rs enable fast-math flags 2018-05-24 16:04:39 +02:00
simd-intrinsic-float-log10.rs enable fast-math flags 2018-05-24 16:04:39 +02:00
simd-intrinsic-float-minmax.rs Upgrade to LLVM's master branch (LLVM 7) 2018-07-10 13:43:01 -07:00
simd-intrinsic-float-pow.rs enable fast-math flags 2018-05-24 16:04:39 +02:00
simd-intrinsic-float-powi.rs enable fast-math flags 2018-05-24 16:04:39 +02:00
simd-intrinsic-float-sin.rs enable fast-math flags 2018-05-24 16:04:39 +02:00
simd-intrinsic-generic-gather.rs add gather/scatter run-time test 2018-05-24 16:04:39 +02:00
simd-intrinsic-generic-scatter.rs add gather/scatter run-time test 2018-05-24 16:04:39 +02:00
simd-intrinsic-generic-select.rs add codegen test 2018-03-18 19:55:20 +01:00
slice-init.rs rustc_trans: use more of the trans::mir and ty::layout APIs throughout. 2017-11-19 02:14:28 +02:00
slice-position-bounds-check.rs hopefully make test pass on windows 2018-07-31 11:17:26 +02:00
sparc-struct-abi.rs Only run the sparc-abi test on sparc 2018-07-31 22:47:12 +03:00
stack-probes.rs bump minimum LLVM version to 5.0 2018-07-09 11:35:52 +02:00
stores.rs Upgrade to LLVM's master branch (LLVM 7) 2018-07-10 13:43:01 -07:00
swap-small-types.rs Only run the test on x86_64 2018-07-21 23:13:51 -07:00
target-cpu-on-functions.rs Relax the target-cpu-on-function codegen test so it just checks for presence of the attribute. 2018-08-09 09:39:02 +02:00
target-feature-on-functions.rs Add -C target-feature to all functions 2018-04-28 14:28:15 -07:00
unchecked-float-casts.rs Stabilize i128_type 2018-03-26 08:36:50 -05:00
vec-clear.rs inore some codegen tests when debug assertions are enabled 2018-08-06 18:45:15 +02:00
vec-iter-collect-len.rs inore some codegen tests when debug assertions are enabled 2018-08-06 18:45:15 +02:00
vec-optimizes-away.rs inore some codegen tests when debug assertions are enabled 2018-08-06 18:45:15 +02:00
vtabletype.rs bump minimum LLVM version to 5.0 2018-07-09 11:35:52 +02:00
x86_mmx.rs test: Ignore some problematic tests on powerpc and powerpc64* 2018-06-17 12:00:47 +02:00
zip.rs Expand .zip() specialization to .map() and .cloned() 2016-10-17 10:58:21 +02:00