From 791a5a9e47b120d98a9f7f3c8e7fe1e8977e08e6 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Tue, 19 May 2015 20:19:01 +0200 Subject: llvm: do not forget new type in no-op conversion. Fix ticket 70. --- src/ortho/llvm/ortho_llvm.adb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/ortho/llvm/ortho_llvm.adb') diff --git a/src/ortho/llvm/ortho_llvm.adb b/src/ortho/llvm/ortho_llvm.adb index 0975698..80c8f1c 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); -- cgit