File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ rm -r tests/run-make/c-link-to-rust-va-list-fn # requires callee side vararg sup
4949rm tests/ui/c-variadic/valid.rs # same
5050rm tests/ui/c-variadic/trait-method.rs # same
5151rm tests/ui/c-variadic/inherent-method.rs # same
52+ rm tests/ui/sanitizer/kcfi-c-variadic.rs # same
5253rm tests/ui/c-variadic/same-program-multiple-abis-x86_64.rs # variadics for calling conventions other than C unsupported
5354rm tests/ui/delegation/fn-header.rs
5455
@@ -62,6 +63,7 @@ rm tests/ui/asm/x86_64/issue-96797.rs # const and sym inline asm operands don't
6263rm tests/ui/asm/global-asm-mono-sym-fn.rs # same
6364rm tests/ui/asm/naked-asm-mono-sym-fn.rs # same
6465rm tests/ui/asm/x86_64/goto.rs # inline asm labels not supported
66+ rm tests/ui/asm/label-operand.rs # same
6567rm tests/ui/simd/simd-bitmask-notpow2.rs # non-pow-of-2 simd vector sizes
6668rm -r tests/run-make/used-proc-macro # used(linker) isn't supported yet
6769rm tests/ui/linking/no-gc-encapsulation-symbols.rs # same
Original file line number Diff line number Diff line change @@ -141,11 +141,7 @@ pub(crate) fn codegen_const_value<'tcx>(
141141 let base_addr = match fx. tcx . global_alloc ( alloc_id) {
142142 GlobalAlloc :: Memory ( alloc) => {
143143 if alloc. inner ( ) . len ( ) == 0 {
144- let val = alloc. inner ( ) . align . bytes ( ) . wrapping_add ( offset. bytes ( ) ) ;
145- fx. bcx . ins ( ) . iconst (
146- fx. pointer_type ,
147- fx. tcx . truncate_to_target_usize ( val) as i64 ,
148- )
144+ fx. bcx . ins ( ) . iconst ( fx. pointer_type , alloc. inner ( ) . align . bytes ( ) as i64 )
149145 } else {
150146 let data_id = data_id_for_alloc_id (
151147 & mut fx. constants_cx ,
@@ -213,7 +209,9 @@ pub(crate) fn codegen_const_value<'tcx>(
213209 }
214210 } ;
215211 let val = if offset. bytes ( ) != 0 {
216- fx. bcx . ins ( ) . iadd_imm ( base_addr, i64:: try_from ( offset. bytes ( ) ) . unwrap ( ) )
212+ fx. bcx
213+ . ins ( )
214+ . iadd_imm ( base_addr, fx. tcx . truncate_to_target_usize ( offset. bytes ( ) ) as i64 )
217215 } else {
218216 base_addr
219217 } ;
You can’t perform that action at this time.
0 commit comments