aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2021-07-19 08:05:30 +0200
committerTristan Gingold <tgingold@free.fr>2021-07-19 08:06:48 +0200
commit4be34d78ef988819120f7e85121efe90c9c8776f (patch)
tree3eb67f4ca7c29e5a4a6a04f52bebaed6f93677a4
parent343ba4dd21032d5439d86899f5057604e977f87e (diff)
downloadghdl-4be34d78ef988819120f7e85121efe90c9c8776f.tar.gz
ghdl-4be34d78ef988819120f7e85121efe90c9c8776f.tar.bz2
ghdl-4be34d78ef988819120f7e85121efe90c9c8776f.zip
trans-chap9: set line number for gcc. Fix #1817
-rw-r--r--src/vhdl/translate/trans-chap9.adb7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/vhdl/translate/trans-chap9.adb b/src/vhdl/translate/trans-chap9.adb
index b2f2cebba..4e64907d8 100644
--- a/src/vhdl/translate/trans-chap9.adb
+++ b/src/vhdl/translate/trans-chap9.adb
@@ -1106,12 +1106,16 @@ package body Trans.Chap9 is
Parent : constant Iir := Get_Parent (Stmt);
Parent_Info : constant Block_Info_Acc := Get_Info (Parent);
+ Line : constant Natural := Get_Line_Number (Stmt);
+
Comp : Iir;
Comp_Info : Comp_Info_Acc;
Inter_List : O_Inter_List;
Instance : O_Dnode;
begin
-- Create the elaborator for the instantiation.
+ New_Debug_Line_Decl (Line);
+
Start_Procedure_Decl (Inter_List, Create_Identifier ("COMP_ELAB"),
O_Storage_Private);
New_Interface_Decl (Inter_List, Instance, Wki_Instance,
@@ -1122,8 +1126,6 @@ package body Trans.Chap9 is
Push_Local_Factory;
Set_Scope_Via_Param_Ptr (Base.Block_Scope, Instance);
- New_Debug_Line_Stmt (Get_Line_Number (Stmt));
-
-- Add access to the instantiation-specific data.
-- This is used only for anonymous subtype variables.
if Has_Scope_Type (Info.Block_Scope) then
@@ -1161,6 +1163,7 @@ package body Trans.Chap9 is
Clear_Scope (Base.Block_Scope);
Pop_Local_Factory;
+ New_Debug_Line_Stmt (Line);
Finish_Subprogram_Body;
end Translate_Component_Instantiation_Subprogram;