diff options
Diffstat (limited to 'src/ortho/llvm')
-rw-r--r-- | src/ortho/llvm/ortho_llvm.adb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ortho/llvm/ortho_llvm.adb b/src/ortho/llvm/ortho_llvm.adb index 097569819..80c8f1c9b 100644 --- a/src/ortho/llvm/ortho_llvm.adb +++ b/src/ortho/llvm/ortho_llvm.adb @@ -1486,8 +1486,9 @@ package body Ortho_LLVM is return Val; end if; if Rtype.LLVM = Val.Etype.LLVM then - -- Same underlying LLVM type: nothing to do. - return Val; + -- Same underlying LLVM type: no conversion but keep new type in + -- case of change of sign. + return O_Enode'(LLVM => Val.LLVM, Etype => Rtype); end if; if Unreach then return O_Enode'(LLVM => Val.LLVM, Etype => Rtype); |