do not add noalias in return position

This commit is contained in:
Ralf Jung 2023-01-02 15:11:19 +01:00
parent b38a6d373c
commit e7cad62257
2 changed files with 5 additions and 3 deletions

View file

@ -145,7 +145,7 @@ pub fn raw_struct(_: *const S) {
// `Box` can get deallocated during execution of the function, so it should
// not get `dereferenceable`.
// CHECK: noalias noundef nonnull align 4 {{i32\*|ptr}} @_box({{i32\*|ptr}} noalias noundef nonnull align 4 %x)
// CHECK: noundef nonnull align 4 {{i32\*|ptr}} @_box({{i32\*|ptr}} noalias noundef nonnull align 4 %x)
#[no_mangle]
pub fn _box(x: Box<i32>) -> Box<i32> {
x