aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2019-07-24 05:20:44 +0200
committerTristan Gingold <tgingold@free.fr>2019-07-24 05:23:33 +0200
commitad603ca5e806e14f200a508da9d79620b45e22f0 (patch)
tree8c9461803b5d3aecac75a8dc129e2985b3425962
parenta4e36e2bb3a636b33390357d05e8e5ea018c3c42 (diff)
downloadghdl-ad603ca5e806e14f200a508da9d79620b45e22f0.tar.gz
ghdl-ad603ca5e806e14f200a508da9d79620b45e22f0.tar.bz2
ghdl-ad603ca5e806e14f200a508da9d79620b45e22f0.zip
synth: do not consider (unrecognized) ieee functions as user functions.
-rw-r--r--src/synth/synth-expr.adb19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/synth/synth-expr.adb b/src/synth/synth-expr.adb
index 0d28069ba..558b54d2c 100644
--- a/src/synth/synth-expr.adb
+++ b/src/synth/synth-expr.adb
@@ -1503,6 +1503,25 @@ package body Synth.Expr is
M : Areapools.Mark_Type;
Res : Value_Acc;
begin
+ -- Is it a call to an ieee function ?
+ declare
+ Pkg : constant Node := Get_Parent (Imp);
+ Unit : Node;
+ Lib : Node;
+ begin
+ if Get_Kind (Pkg) = Iir_Kind_Package_Declaration then
+ Unit := Get_Parent (Pkg);
+ if Get_Kind (Unit) = Iir_Kind_Design_Unit then
+ Lib := Get_Library (Get_Design_File (Unit));
+ if Get_Identifier (Lib) = Std_Names.Name_Ieee then
+ Error_Msg_Synth
+ (+Expr, "unhandled call to an ieee function");
+ raise Internal_Error;
+ end if;
+ end if;
+ end if;
+ end;
+
Areapools.Mark (M, Instance_Pool.all);
Subprg_Inst := Make_Instance (Syn_Inst, Get_Info (Bod));