diff options
| author | Alasdair Armstrong | 2018-08-30 17:58:33 +0100 |
|---|---|---|
| committer | Alasdair Armstrong | 2018-08-30 17:59:40 +0100 |
| commit | dee068786b2ef0b0d57fc02ca042e176c74db9b0 (patch) | |
| tree | 6be133c7a3269e513935dbe1e9dd70a559a78749 /lib/sail.c | |
| parent | 26d55b94f23f73ef9adf6a3031e48b84e724ac09 (diff) | |
C: Fix a bug where function argument type becomes more specific due to flow typing
Added a regression test as c/test/downcast_fn.sail
Diffstat (limited to 'lib/sail.c')
| -rw-r--r-- | lib/sail.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -173,6 +173,12 @@ void CREATE_OF(sail_int, mach_int)(sail_int *rop, mach_int op) } inline +mach_int CREATE_OF(mach_int, sail_int)(const sail_int op) +{ + return mpz_get_ui(op); +} + +inline void RECREATE_OF(sail_int, mach_int)(sail_int *rop, mach_int op) { mpz_set_si(*rop, op); |
