aboutsummaryrefslogtreecommitdiffstats
path: root/src/ortho/llvm/ortho_llvm.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2015-05-19 20:19:01 +0200
committerTristan Gingold <tgingold@free.fr>2015-05-19 20:19:01 +0200
commit791a5a9e47b120d98a9f7f3c8e7fe1e8977e08e6 (patch)
tree9c84b1c0e9879cb0d3fe1b9b7f1caae73e29bd6c /src/ortho/llvm/ortho_llvm.adb
parent51cc0a36b05cc0653d30df349a635f9af16c00cb (diff)
downloadghdl-791a5a9e47b120d98a9f7f3c8e7fe1e8977e08e6.tar.gz
ghdl-791a5a9e47b120d98a9f7f3c8e7fe1e8977e08e6.tar.bz2
ghdl-791a5a9e47b120d98a9f7f3c8e7fe1e8977e08e6.zip
llvm: do not forget new type in no-op conversion.
Fix ticket 70.
Diffstat (limited to 'src/ortho/llvm/ortho_llvm.adb')
-rw-r--r--src/ortho/llvm/ortho_llvm.adb5
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);