diff options
author | Tristan Gingold <tgingold@free.fr> | 2019-07-24 05:20:44 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2019-07-24 05:23:33 +0200 |
commit | ad603ca5e806e14f200a508da9d79620b45e22f0 (patch) | |
tree | 8c9461803b5d3aecac75a8dc129e2985b3425962 /src/synth/synth-expr.adb | |
parent | a4e36e2bb3a636b33390357d05e8e5ea018c3c42 (diff) | |
download | ghdl-ad603ca5e806e14f200a508da9d79620b45e22f0.tar.gz ghdl-ad603ca5e806e14f200a508da9d79620b45e22f0.tar.bz2 ghdl-ad603ca5e806e14f200a508da9d79620b45e22f0.zip |
synth: do not consider (unrecognized) ieee functions as user functions.
Diffstat (limited to 'src/synth/synth-expr.adb')
-rw-r--r-- | src/synth/synth-expr.adb | 19 |
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)); |