rust/src/test
Alexey Tarasov 0cd358742d Fixes issue 39827: ICE in volatile_store intrinsic
- adds handling of zero-sized types for volatile_store.
- adds type size checks and warnigns for other volatile intrinsics.
- adds a test to check warnings emitting.

Cause of the issue

While preparing for trans_intrinsic_call() invoke arguments are
processed with trans_argument() method which excludes zero-sized types
from argument list (to be more correct - all arguments for which
ArgKind is Ignore are filtered out). As result volatile_store() intrinsic
gets one argument instead of expected address and value.

How it is fixed

Modification of the trans_argument() method may cause side effects,
therefore change was implemented in volatile_store() intrinsic building
code itself. Now it checks function signature and if it was specialised
with zero-sized type, then emits C_nil() instead of accessing
non-existing second argument.

Additionally warnings are added for all volatile operations which are
specialised with zero-sized arguments. In fact, those operations are omitted
in LLVM backend if no memory affected at all, e.g. number of elements
is zero or type is zero-sized. This was not explicitly documented before
and could lead to potential issues if developer expects volatile behaviour,
but type has degraded to zero-sized.
2017-08-12 18:42:44 +10:00
..
codegen Auto merge of #43488 - Florob:repeat-opt, r=arielb1 2017-08-06 08:09:59 +00:00
codegen-units Adapt cgu-partitioning tests to pre-trans symbol internalization. 2017-07-13 13:29:25 +02:00
compile-fail Auto merge of #43745 - kennytm:fix-43162, r=aturon 2017-08-11 07:09:44 +00:00
compile-fail-fulldeps Rollup merge of #43744 - MaloJaffre:stage1-test, r=Mark-Simulacrum 2017-08-11 10:20:24 +02:00
debuginfo Pretty-printers tests: gdbr -> gdb 2017-06-09 18:51:28 +03:00
incremental Detect implicitly defined late bound lifetime parameters as well 2017-07-18 00:12:48 +03:00
mir-opt Auto merge of #43772 - arielb1:nonfree-block, r=nagisa 2017-08-12 00:54:38 +00:00
parse-fail Simplify parsing of paths 2017-07-27 22:59:34 +03:00
pretty
run-fail Add tests for issues with the E-needstest label 2017-07-25 12:23:16 +09:00
run-fail-fulldeps Implement a file-path remapping feature in support of debuginfo and reproducible builds. 2017-04-26 15:44:02 +02:00
run-make Ignore tests that fail on stage1 2017-08-08 18:33:43 +02:00
run-pass Auto merge of #43772 - arielb1:nonfree-block, r=nagisa 2017-08-12 00:54:38 +00:00
run-pass-fulldeps Ignore tests that fail on stage1 2017-08-08 18:33:43 +02:00
run-pass-valgrind Move unsized_tuple_coercion behind a feature gate. 2017-06-29 21:25:35 +09:00
rustdoc Remove \0 printing 2017-08-07 22:25:15 +02:00
ui Fixes issue 39827: ICE in volatile_store intrinsic 2017-08-12 18:42:44 +10:00
ui-fulldeps rustc: Rearchitect lints to be emitted more eagerly 2017-08-09 09:13:51 -07:00
COMPILER_TESTS.md Merge ui/README.md into COMPILER_TESTS.md and describe how custom UI normalization works. 2017-07-11 16:57:53 +08:00