diff options
author | Tristan Gingold | 2015-05-19 20:19:01 +0200 |
---|---|---|
committer | Tristan Gingold | 2015-05-19 20:19:01 +0200 |
commit | 791a5a9e47b120d98a9f7f3c8e7fe1e8977e08e6 (patch) | |
tree | 9c84b1c0e9879cb0d3fe1b9b7f1caae73e29bd6c /src/ortho/llvm | |
parent | 51cc0a36b05cc0653d30df349a635f9af16c00cb (diff) | |
download | ghdl-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')
-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 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); |