diff options
author | Philip Herron <philip.herron@embecosm.com> | 2021-06-24 15:56:12 +0100 |
---|---|---|
committer | Philip Herron <philip.herron@embecosm.com> | 2021-06-24 16:03:18 +0100 |
commit | 71c644f430edbae114396c075baab330889c698c (patch) | |
tree | 84d12952ec7c8c9830337dd48f3b452f320353bb /gcc/rust/rust-backend.h | |
parent | c87f2c72dcfa67f1a78fafacaf49043f11c7df6a (diff) | |
download | gcc-71c644f430edbae114396c075baab330889c698c.zip gcc-71c644f430edbae114396c075baab330889c698c.tar.gz gcc-71c644f430edbae114396c075baab330889c698c.tar.bz2 |
Change unit-type from void_type_node to a zero sized unsigned integer
GCC does not support unit-type when it is represented as void, unsigned
integer of precision zero seems to work. The missing piece here is that
functions with return type of unit are still represented by a void type
node there is an ICE in
```
0x1d551d5 wi::min_value(unsigned int,signop)
../../gccrs/gcc/wide-int.cc:346
```
Addresses #155
Diffstat (limited to 'gcc/rust/rust-backend.h')
-rw-r--r-- | gcc/rust/rust-backend.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/rust/rust-backend.h b/gcc/rust/rust-backend.h index e71d81e..35271b6 100644 --- a/gcc/rust/rust-backend.h +++ b/gcc/rust/rust-backend.h @@ -109,6 +109,9 @@ public: // unsafe.Pointer is represented as *void. virtual Btype *void_type () = 0; + // get unit-type + virtual Btype *unit_type () = 0; + // Get the unnamed boolean type. virtual Btype *bool_type () = 0; |