Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
7b652d3
Haiku: explicitly set CMAKE_SYSTEM_NAME when cross-compiling
nielx Sep 19, 2020
cc0b718
Mark inout asm! operands as used in liveness pass
oliviacrain Oct 15, 2020
fd193f2
Treat InOut variables like other input variables
oliviacrain Oct 17, 2020
4e2c59a
Greatly improve display for small mobile devices screens
GuillaumeGomez Oct 18, 2020
17c6c59
Mark InOut operands as used in RWU table with write_place
oliviacrain Oct 19, 2020
8f0bced
Refactor liveness-issue-77915 to liveness-asm and improve tests
oliviacrain Oct 19, 2020
d80f127
Avoid panic_bounds_check in fmt::write.
m-ou-se Oct 19, 2020
c647735
rustc_lint: remove unused to_string
est31 Oct 20, 2020
00d23cf
Make {u,}int_range functions a bit nicer
est31 Oct 20, 2020
fa09404
Fix build failure of rustfmt
bishtpawan Oct 20, 2020
ea24395
Add debug_asserts for the unsafe indexing in fmt::write.
m-ou-se Oct 20, 2020
5948e62
Sync LLVM submodule if it has been initialized
est31 Oct 20, 2020
356d5b5
Add test to check for fmt::write bloat.
m-ou-se Oct 20, 2020
e852a4a
Update cargo
ehuss Oct 20, 2020
3adac03
Add test case for #77062
wesleywiser Oct 21, 2020
2720b2d
Limit liveness-asm tests to x86_64
oliviacrain Oct 21, 2020
dc29c7a
Bless liveness-asm output
oliviacrain Oct 21, 2020
7f58477
Fix formatting
bishtpawan Oct 21, 2020
51de590
Add tracking issue number for pin_static_ref.
m-ou-se Oct 21, 2020
6fdb31a
Rollup merge of #77976 - oliviacrain:issue-77915-fix, r=matthewjasper
jonas-schievink Oct 21, 2020
d8545bf
Rollup merge of #78009 - nielx:fix/CMAKE_SYSTEM_NAME, r=Mark-Simulacrum
jonas-schievink Oct 21, 2020
6126d4e
Rollup merge of #78084 - GuillaumeGomez:improve-mobile-display, r=jyn…
jonas-schievink Oct 21, 2020
525c35c
Rollup merge of #78122 - fusion-engineering-forks:fmt-write-bounds-ch…
jonas-schievink Oct 21, 2020
60298b2
Rollup merge of #78153 - est31:downloaded_llvm_maybe_sync, r=Mark-Sim…
jonas-schievink Oct 21, 2020
e203d96
Rollup merge of #78155 - est31:rustc_lint_types_refactor, r=davidtwco
jonas-schievink Oct 21, 2020
599f553
Rollup merge of #78156 - bishtpawan:bugfix/rustfmt-no-longer-builds, …
jonas-schievink Oct 21, 2020
56d4032
Rollup merge of #78169 - ehuss:update-cargo, r=ehuss
jonas-schievink Oct 21, 2020
dd77265
Rollup merge of #78172 - wesleywiser:close_77062, r=oli-obk
jonas-schievink Oct 21, 2020
891f3f7
Rollup merge of #78188 - fusion-engineering-forks:static-ref-tracking…
jonas-schievink Oct 21, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Refactor liveness-issue-77915 to liveness-asm and improve tests
  • Loading branch information
oliviacrain committed Oct 19, 2020
commit 8f0bceda13ac871dd452841d3b6aa049f9f649a1
43 changes: 43 additions & 0 deletions src/test/ui/liveness/liveness-asm.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
// Ensure inout asm! operands are marked as used by the liveness pass

// check-pass

#![feature(asm)]
#![allow(dead_code)]
#![warn(unused_assignments)]
#![warn(unused_variables)]

// Test the single inout case
unsafe fn f1(mut src: *const u8) {
asm!("/*{0}*/", inout(reg) src); //~ WARN value assigned to `src` is never read
}

unsafe fn f2(mut src: *const u8) -> *const u8 {
asm!("/*{0}*/", inout(reg) src);
src
}

// Test the split inout case
unsafe fn f3(mut src: *const u8) {
asm!("/*{0}*/", inout(reg) src => src); //~ WARN value assigned to `src` is never read
}

unsafe fn f4(mut src: *const u8) -> *const u8 {
asm!("/*{0}*/", inout(reg) src => src);
src
}

// Tests the use of field projections
struct S {
field: *mut u8,
}

unsafe fn f5(src: &mut S) {
asm!("/*{0}*/", inout(reg) src.field);
}

unsafe fn f6(src: &mut S) {
asm!("/*{0}*/", inout(reg) src.field => src.field);
}

fn main() {}
23 changes: 23 additions & 0 deletions src/test/ui/liveness/liveness-asm.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
warning: value assigned to `src` is never read
--> $DIR/liveness-asm.rs:12:32
|
LL | asm!("/*{0}*/", inout(reg) src);
| ^^^
|
note: the lint level is defined here
--> $DIR/liveness-asm.rs:7:9
|
LL | #![warn(unused_assignments)]
| ^^^^^^^^^^^^^^^^^^
= help: maybe it is overwritten before being read?

warning: value assigned to `src` is never read
--> $DIR/liveness-asm.rs:22:39
|
LL | asm!("/*{0}*/", inout(reg) src => src);
| ^^^
|
= help: maybe it is overwritten before being read?

warning: 2 warnings emitted

36 changes: 0 additions & 36 deletions src/test/ui/liveness/liveness-issue-77915.rs

This file was deleted.