Skip to content

Commit dd37470

Browse files
committed
fix some wrong tests and add some new ones
Note that C still doesn't implement align, but as of #39 we combinatoric repr(rust) vs repr(c) and include rustcall as a calling convention, so our coverage of rust <-> rust (in particular for codegen_backend users) is significantly improved. fixes #23 fixes #21 fixes #15
1 parent 842036b commit dd37470

File tree

6 files changed

+29
-2
lines changed

6 files changed

+29
-2
lines changed

Diff for: include/tests/normal/simple.kdl

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ fn "print" {
1313

1414
fn "scale" {
1515
inputs { _ "Point3"; factor "f32"; }
16-
output { "Point3"; }
16+
outputs { "Point3"; }
1717
}
1818

1919
fn "add" {
+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// This was a problem for rustc (I think u32 = ulong here?)
2+
//
3+
// https://github.com/rust-lang/rust/issues/80127
4+
5+
@align 16
6+
struct "TwoU32s" {
7+
a "u32"
8+
b "u32"
9+
}
+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// This was a problem for rustc on ppc64le
2+
//
3+
// https://github.com/rust-lang/rust/issues/122767
4+
5+
@align 16
6+
struct "TwoU64s" {
7+
a "u64"
8+
b "u64"
9+
}
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// An option-like enum of i32
22

3-
tagged "OptI32Tagged" {
3+
tagged "OptionI32" {
44
Some { _ "i32"; }
55
None
66
}

Diff for: include/tests/procgen/tagged/OptionU128.procgen.kdl

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// This type was a problem for cranelift
2+
//
3+
// https://github.com/rust-lang/rustc_codegen_cranelift/issues/1449
4+
5+
tagged "OptionU128" {
6+
Some { _ "u128"; }
7+
None
8+
}

Diff for: include/tests/procgen/union/MultiVariantUnion.procgen.kdl

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
union "MultiVariantUnion" {
22
_ "u32"
33
_ "i64"
4+
_ "Point3"
45
}
56

67
struct "Point3" {

0 commit comments

Comments
 (0)