Skip to content

Commit e3deac5

Browse files
committed
Fix tests
1 parent 607ec89 commit e3deac5

21 files changed

+29
-5
lines changed

src/base.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,9 @@ pub fn compile_codegen_unit(tcx: TyCtxt<'_>, cgu_name: Symbol, target_info: Arc<
144144
if env::var("CG_GCCJIT_DUMP_RTL").as_deref() == Ok("1") {
145145
context.add_command_line_option("-fdump-rtl-vregs");
146146
}
147+
if env::var("CG_GCCJIT_DUMP_RTL_ALL").as_deref() == Ok("1") {
148+
context.add_command_line_option("-fdump-rtl-all");
149+
}
147150
if env::var("CG_GCCJIT_DUMP_TREE_ALL").as_deref() == Ok("1") {
148151
context.add_command_line_option("-fdump-tree-all");
149152
}

src/int.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,12 @@ impl<'gcc, 'tcx> CodegenCx<'gcc, 'tcx> {
546546
}
547547

548548
pub fn gcc_uint(&self, typ: Type<'gcc>, int: u64) -> RValue<'gcc> {
549-
if self.is_native_int_type_or_bool(typ) {
549+
if typ.is_u128(self) {
550+
// FIXME(antoyo): libgccjit cannot create 128-bit values yet.
551+
let num = self.context.new_rvalue_from_long(self.u64_type, int as i64);
552+
self.gcc_int_cast(num, typ)
553+
}
554+
else if self.is_native_int_type_or_bool(typ) {
550555
self.context.new_rvalue_from_long(typ, u64::try_from(int).expect("u64::try_from") as i64)
551556
}
552557
else {
@@ -572,6 +577,7 @@ impl<'gcc, 'tcx> CodegenCx<'gcc, 'tcx> {
572577
}
573578
}
574579
else if typ.is_i128(self) {
580+
// FIXME(antoyo): libgccjit cannot create 128-bit values yet.
575581
let num = self.context.new_rvalue_from_long(self.u64_type, num as u64 as i64);
576582
self.gcc_int_cast(num, typ)
577583
}

tests/run/abort1.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
// status: signal
55

66
#![feature(auto_traits, lang_items, no_core, start, intrinsics)]
7+
#![allow(internal_features)]
78

89
#![no_std]
910
#![no_core]

tests/run/abort2.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
// status: signal
55

66
#![feature(auto_traits, lang_items, no_core, start, intrinsics)]
7+
#![allow(internal_features)]
78

89
#![no_std]
910
#![no_core]

tests/run/array.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// 10
99

1010
#![feature(arbitrary_self_types, auto_traits, lang_items, no_core, start, intrinsics)]
11+
#![allow(internal_features)]
1112

1213
#![no_std]
1314
#![no_core]

tests/run/assign.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// 7 8
66
// 10
77

8-
#![allow(unused_attributes)]
8+
#![allow(internal_features, unused_attributes)]
99
#![feature(auto_traits, lang_items, no_core, start, intrinsics, track_caller)]
1010

1111
#![no_std]

tests/run/closure.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
#![feature(arbitrary_self_types, auto_traits, lang_items, no_core, start, intrinsics,
1212
unboxed_closures)]
13+
#![allow(internal_features)]
1314

1415
#![no_std]
1516
#![no_core]

tests/run/condition.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
// 1
77

88
#![feature(arbitrary_self_types, auto_traits, lang_items, no_core, start, intrinsics)]
9+
#![allow(internal_features)]
910

1011
#![no_std]
1112
#![no_core]

tests/run/empty_main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
// status: 0
55

66
#![feature(auto_traits, lang_items, no_core, start)]
7+
#![allow(internal_features)]
78

89
#![no_std]
910
#![no_core]

tests/run/exit.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
// status: 2
55

66
#![feature(auto_traits, lang_items, no_core, start, intrinsics)]
7+
#![allow(internal_features)]
78

89
#![no_std]
910
#![no_core]

tests/run/exit_code.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
// status: 1
55

66
#![feature(auto_traits, lang_items, no_core, start)]
7+
#![allow(internal_features)]
78

89
#![no_std]
910
#![no_core]

tests/run/fun_ptr.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
// stdout: 1
66

77
#![feature(arbitrary_self_types, auto_traits, lang_items, no_core, start, intrinsics)]
8+
#![allow(internal_features)]
89

910
#![no_std]
1011
#![no_core]

tests/run/int_overflow.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// stdout: Success
55
// status: signal
66

7-
#![allow(unused_attributes)]
7+
#![allow(internal_features, unused_attributes)]
88
#![feature(auto_traits, lang_items, no_core, start, intrinsics)]
99

1010
#![no_std]

tests/run/mut_ref.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// 6
88
// 11
99

10-
#![allow(unused_attributes)]
10+
#![allow(internal_features, unused_attributes)]
1111
#![feature(auto_traits, lang_items, no_core, start, intrinsics, track_caller)]
1212

1313
#![no_std]

tests/run/operations.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// 39
66
// 10
77

8-
#![allow(unused_attributes)]
8+
#![allow(internal_features, unused_attributes)]
99
#![feature(auto_traits, lang_items, no_core, start, intrinsics, arbitrary_self_types)]
1010

1111
#![no_std]

tests/run/ptr_cast.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
// stdout: 1
66

77
#![feature(arbitrary_self_types, auto_traits, lang_items, no_core, start, intrinsics)]
8+
#![allow(internal_features)]
89

910
#![no_std]
1011
#![no_core]

tests/run/return-tuple.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
// 42
88

99
#![feature(auto_traits, lang_items, no_core, start, intrinsics)]
10+
#![allow(internal_features)]
1011

1112
#![no_std]
1213
#![no_core]

tests/run/slice.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
// stdout: 5
66

77
#![feature(arbitrary_self_types, auto_traits, lang_items, no_core, start, intrinsics)]
8+
#![allow(internal_features)]
89

910
#![no_std]
1011
#![no_core]

tests/run/static.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
// 1
1111

1212
#![feature(auto_traits, lang_items, no_core, start, intrinsics)]
13+
#![allow(internal_features)]
1314

1415
#![no_std]
1516
#![no_core]

tests/run/structs.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
// 2
77

88
#![feature(auto_traits, lang_items, no_core, start, intrinsics)]
9+
#![allow(internal_features)]
910

1011
#![no_std]
1112
#![no_core]

tests/run/tuple.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
// stdout: 3
66

77
#![feature(auto_traits, lang_items, no_core, start, intrinsics)]
8+
#![allow(internal_features)]
89

910
#![no_std]
1011
#![no_core]

0 commit comments

Comments
 (0)