On 30/09/15 23:48, Joris van Rantwijk wrote:
On 2015-09-30, Tristan Gingold wrote:
On 30/09/15 13:04, Joris van Rantwijk wrote:
When building the LLVM backend on i386, I get compiler errors.

Should be fixed now.  Sorry, I didn't try this configuration after
the changes in config/

Yes, fixed.
Thanks.

Next problem. So far I see this only with LLVM backend on i386.
During building of the IEEE library, GHDL fails:

../../../../ghdl_llvm -a --GHDL1=ghdl1-llvm -g --std=87 -P../std --work=ieee 
../../src/ieee/numeric_bit-body.v87

[...]

On casual inspection of trans-chap2.adb, Translate_Subprogram_Body, it appears 
that the variable Is_Ortho_Func may be used uninitialized.

Ah, thanks.  Can you try the following patch.
Which distribution and version of linux are you using ?

Tristan.

diff -r 019e94db0d22 src/vhdl/translate/trans-chap2.adb
--- a/src/vhdl/translate/trans-chap2.adb        Wed Sep 30 20:59:13 2015 +0200
+++ b/src/vhdl/translate/trans-chap2.adb        Thu Oct 01 19:58:42 2015 +0200
@@ -368,10 +368,13 @@
         Get_Kind (Spec) = Iir_Kind_Procedure_Declaration
         and then Get_Suspend_Flag (Spec);

+      --  True if the subprogram is translated to a function in ortho.
+ Is_Ortho_Func : constant Boolean := Is_Subprogram_Ortho_Function (Spec);
+
       Old_Subprogram : Iir;
       Mark           : Id_Mark_Type;
       Final          : Boolean;
-      Is_Ortho_Func  : Boolean;
+

-- Set for a public method. In this case, the lock must be acquired
       --  and retained.
@@ -596,14 +599,11 @@

       --  If finalization is required and if the subprogram is a function,
       --  create a variable for the result.
-      if Final or Is_Prot then
-         Is_Ortho_Func := Is_Subprogram_Ortho_Function (Spec);
-         if Is_Ortho_Func then
-            New_Var_Decl
-              (Info.Subprg_Result, Get_Identifier ("RESULT"),
-               O_Storage_Local,
-               Get_Ortho_Type (Get_Return_Type (Spec), Mode_Value));
-         end if;
+      if (Final or Is_Prot) and Is_Ortho_Func then
+         New_Var_Decl
+           (Info.Subprg_Result, Get_Identifier ("RESULT"),
+            O_Storage_Local,
+            Get_Ortho_Type (Get_Return_Type (Spec), Mode_Value));
       end if;

       --  If finalization is required, create a dummy loop around the


_______________________________________________
Ghdl-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/ghdl-discuss

Reply via email to