rust/src/test/codegen
bors d1d79ae3ad Auto merge of #55701 - tromey:ice-fix, r=matthewjasper
Fix emission of niche-filling discriminant values

Bug #55606 points out a regression introduced by #54004; namely that
an assertion can erroneously fire when a niche-filling discriminant
value is emitted.

This fixes the bug by removing the assertion, and furthermore by
arranging for the discriminant value to be masked according to the
size of the niche.  This makes handling the discriminant a bit simpler
for debuggers.

The test case is from Jonathan Turner.

Closes #55606
2018-11-12 04:12:26 +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 rustc: Tweak filenames encoded into metadata 2018-09-27 16:53:25 -07: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 Rely only on base alignment and offset for computing field alignment 2018-09-24 23:09:44 -04:00
alloc-optimisation.rs Add a no-system-llvm compilecheck header 2017-06-15 19:11:55 +03:00
box-maybe-uninit.rs add codegen test 2018-09-30 17:27:06 +02: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
enum-debug-clike.rs Add more enum debug info tests 2018-10-30 12:06:07 -06:00
enum-debug-niche-2.rs Fix emission of niche-filling discriminant values 2018-11-05 08:44:36 -07:00
enum-debug-niche.rs Add more enum debug info tests 2018-10-30 12:06:07 -06:00
enum-debug-tagged.rs Add more enum debug info tests 2018-10-30 12:06:07 -06:00
exact_div.rs Add a codegen test for exact_div intrinsic 2018-03-23 23:47:22 -07:00
export-no-mangle.rs rustc: Allow #[no_mangle] anywhere in a crate 2018-10-06 13:57:30 -07:00
extern-functions.rs make #[unwind] attribute specify expectations more clearly 2018-02-20 19:12:52 -05:00
external-no-mangle-fns.rs rustc: Allow #[no_mangle] anywhere in a crate 2018-10-06 13:57:30 -07:00
external-no-mangle-statics.rs rustc: Allow #[no_mangle] anywhere in a crate 2018-10-06 13:57:30 -07: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 Do not put noalias annotations by default 2018-09-29 13:00:41 +03: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-13018.rs Added explicit optimization flag to test 2018-08-20 11:13:45 -04: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 ignore {std,fast,vector,this}call on non-x86 windows 2018-09-27 16:50:47 -04: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 rustc: Allow #[no_mangle] anywhere in a crate 2018-10-06 13:57:30 -07: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 Stabilize min_const_fn 2018-10-05 10:36:14 +02: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: Allow #[no_mangle] anywhere in a crate 2018-10-06 13:57:30 -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 Support for disabling the PLT on ELF targets 2018-10-11 21:11:00 +03: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
no-plt.rs Support for disabling the PLT on ELF targets 2018-10-11 21:11:00 +03: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 Support memcpy/memmove with differing src/dst alignment 2018-11-04 18:54:37 +01: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 Support memcpy/memmove with differing src/dst alignment 2018-11-04 18:54:37 +01: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