diff options
| author | Dan Gohman <sunfish@mozilla.com> | 2017-11-11 06:41:45 -0800 |
|---|---|---|
| committer | Dan Gohman <sunfish@mozilla.com> | 2017-11-11 06:41:45 -0800 |
| commit | 365c159b8074a89c72cfab54e53fe767f3a63900 (patch) | |
| tree | 72237204472099b2d291b978f7c79f64fd0ee986 | |
| parent | 626d93b86d3fe0c3f12f0299d72a8f65185ec268 (diff) | |
| download | rust-365c159b8074a89c72cfab54e53fe767f3a63900.tar.gz rust-365c159b8074a89c72cfab54e53fe767f3a63900.zip | |
Add comments to the intrinsic-unreachable test programs.
The return value in these tests is just being used to generate extra code so that it can be detected in the test script, which is just counting lines in the assembly output.
| -rw-r--r-- | src/test/run-make/intrinsic-unreachable/exit-ret.rs | 3 | ||||
| -rw-r--r-- | src/test/run-make/intrinsic-unreachable/exit-unreachable.rs | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/test/run-make/intrinsic-unreachable/exit-ret.rs b/src/test/run-make/intrinsic-unreachable/exit-ret.rs index 3de079be2a5..1b8b644dd78 100644 --- a/src/test/run-make/intrinsic-unreachable/exit-ret.rs +++ b/src/test/run-make/intrinsic-unreachable/exit-ret.rs @@ -18,5 +18,8 @@ pub fn exit(n: usize) -> i32 { asm!("" :: "r"(n) :: "volatile"); // Can't actually reach this point, but rustc doesn't know that. } + // This return value is just here to generate some extra code for a return + // value, making it easier for the test script to detect whether the + // compiler deleted it. 42 } diff --git a/src/test/run-make/intrinsic-unreachable/exit-unreachable.rs b/src/test/run-make/intrinsic-unreachable/exit-unreachable.rs index 2a9dea1705a..de63809ab66 100644 --- a/src/test/run-make/intrinsic-unreachable/exit-unreachable.rs +++ b/src/test/run-make/intrinsic-unreachable/exit-unreachable.rs @@ -20,5 +20,8 @@ pub fn exit(n: usize) -> i32 { asm!("" :: "r"(n) :: "volatile"); intrinsics::unreachable() } + // This return value is just here to generate some extra code for a return + // value, making it easier for the test script to detect whether the + // compiler deleted it. 42 } |
