diff options
author | Tristan Gingold <tgingold@free.fr> | 2022-07-02 07:37:14 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2022-07-02 07:37:39 +0200 |
commit | 6b56c016c59dc979e1d3c086387e0782917f0e06 (patch) | |
tree | 0efad96d9e2bd93e92ad11dd36832ff310062e5c /src | |
parent | 0aeba1dc5b2560a0e64a627c96e34eb18aa88f64 (diff) | |
download | ghdl-6b56c016c59dc979e1d3c086387e0782917f0e06.tar.gz ghdl-6b56c016c59dc979e1d3c086387e0782917f0e06.tar.bz2 ghdl-6b56c016c59dc979e1d3c086387e0782917f0e06.zip |
vhdl: avoid crash on incorrect use of signatures
For #2116
Diffstat (limited to 'src')
-rw-r--r-- | src/vhdl/vhdl-nodes.ads | 4 | ||||
-rw-r--r-- | src/vhdl/vhdl-nodes_meta.adb | 566 | ||||
-rw-r--r-- | src/vhdl/vhdl-sem_names.adb | 3 |
3 files changed, 292 insertions, 281 deletions
diff --git a/src/vhdl/vhdl-nodes.ads b/src/vhdl/vhdl-nodes.ads index 440001102..4a9fc797f 100644 --- a/src/vhdl/vhdl-nodes.ads +++ b/src/vhdl/vhdl-nodes.ads @@ -905,6 +905,10 @@ package Vhdl.Nodes is -- Get/Set_Type_Marks_List (Field2) -- -- Get/Set_Return_Type_Mark (Field8) + -- + -- Get/Set_Named_Entity (Field4) + -- + -- Get/Set_Is_Forward_Ref (Flag1) -- Iir_Kind_Overload_List (Short) -- diff --git a/src/vhdl/vhdl-nodes_meta.adb b/src/vhdl/vhdl-nodes_meta.adb index 3c6bb2ef5..81b66f3a3 100644 --- a/src/vhdl/vhdl-nodes_meta.adb +++ b/src/vhdl/vhdl-nodes_meta.adb @@ -2847,9 +2847,11 @@ package body Vhdl.Nodes_Meta is Field_Attribute_Specification, Field_Base_Name, -- Iir_Kind_Signature + Field_Is_Forward_Ref, Field_Signature_Prefix, Field_Type_Marks_List, Field_Return_Type_Mark, + Field_Named_Entity, -- Iir_Kind_Aggregate_Info Field_Aggr_Min_Length, Field_Aggr_Others_Flag, @@ -5333,285 +5335,285 @@ package body Vhdl.Nodes_Meta is Iir_Kind_Binding_Indication => 224, Iir_Kind_Entity_Class => 226, Iir_Kind_Attribute_Value => 234, - Iir_Kind_Signature => 237, - Iir_Kind_Aggregate_Info => 244, - Iir_Kind_Procedure_Call => 248, - Iir_Kind_Record_Element_Constraint => 256, - Iir_Kind_Array_Element_Resolution => 258, - Iir_Kind_Record_Resolution => 259, - Iir_Kind_Record_Element_Resolution => 262, - Iir_Kind_Break_Element => 266, - Iir_Kind_Attribute_Specification => 275, - Iir_Kind_Disconnection_Specification => 281, - Iir_Kind_Step_Limit_Specification => 287, - Iir_Kind_Configuration_Specification => 293, - Iir_Kind_Access_Type_Definition => 300, - Iir_Kind_Incomplete_Type_Definition => 307, - Iir_Kind_Interface_Type_Definition => 313, - Iir_Kind_File_Type_Definition => 319, - Iir_Kind_Protected_Type_Declaration => 329, - Iir_Kind_Record_Type_Definition => 339, - Iir_Kind_Array_Type_Definition => 350, - Iir_Kind_Array_Subtype_Definition => 367, - Iir_Kind_Record_Subtype_Definition => 380, - Iir_Kind_Access_Subtype_Definition => 388, - Iir_Kind_Physical_Subtype_Definition => 398, - Iir_Kind_Floating_Subtype_Definition => 409, - Iir_Kind_Integer_Subtype_Definition => 419, - Iir_Kind_Enumeration_Subtype_Definition => 429, - Iir_Kind_Enumeration_Type_Definition => 440, - Iir_Kind_Integer_Type_Definition => 448, - Iir_Kind_Floating_Type_Definition => 456, - Iir_Kind_Physical_Type_Definition => 467, - Iir_Kind_Range_Expression => 475, - Iir_Kind_Protected_Type_Body => 483, - Iir_Kind_Wildcard_Type_Definition => 487, - Iir_Kind_Foreign_Vector_Type_Definition => 488, - Iir_Kind_Subtype_Definition => 495, - Iir_Kind_Scalar_Nature_Definition => 503, - Iir_Kind_Record_Nature_Definition => 516, - Iir_Kind_Array_Nature_Definition => 530, - Iir_Kind_Array_Subnature_Definition => 545, - Iir_Kind_Overload_List => 546, - Iir_Kind_Foreign_Module => 551, - Iir_Kind_Entity_Declaration => 564, - Iir_Kind_Configuration_Declaration => 574, - Iir_Kind_Context_Declaration => 580, - Iir_Kind_Package_Declaration => 595, - Iir_Kind_Package_Instantiation_Declaration => 609, - Iir_Kind_Vmode_Declaration => 621, - Iir_Kind_Vprop_Declaration => 633, - Iir_Kind_Vunit_Declaration => 646, - Iir_Kind_Package_Body => 654, - Iir_Kind_Architecture_Body => 667, - Iir_Kind_Type_Declaration => 674, - Iir_Kind_Anonymous_Type_Declaration => 680, - Iir_Kind_Subtype_Declaration => 688, - Iir_Kind_Nature_Declaration => 694, - Iir_Kind_Subnature_Declaration => 701, - Iir_Kind_Package_Header => 703, - Iir_Kind_Unit_Declaration => 712, - Iir_Kind_Library_Declaration => 720, - Iir_Kind_Component_Declaration => 730, - Iir_Kind_Attribute_Declaration => 737, - Iir_Kind_Group_Template_Declaration => 743, - Iir_Kind_Group_Declaration => 750, - Iir_Kind_Element_Declaration => 758, - Iir_Kind_Nature_Element_Declaration => 765, - Iir_Kind_Non_Object_Alias_Declaration => 773, - Iir_Kind_Psl_Declaration => 781, - Iir_Kind_Psl_Endpoint_Declaration => 795, - Iir_Kind_Enumeration_Literal => 807, - Iir_Kind_Function_Declaration => 833, - Iir_Kind_Procedure_Declaration => 856, - Iir_Kind_Function_Body => 866, - Iir_Kind_Procedure_Body => 877, - Iir_Kind_Function_Instantiation_Declaration => 888, - Iir_Kind_Procedure_Instantiation_Declaration => 898, - Iir_Kind_Terminal_Declaration => 907, - Iir_Kind_Object_Alias_Declaration => 919, - Iir_Kind_Free_Quantity_Declaration => 931, - Iir_Kind_Spectrum_Quantity_Declaration => 944, - Iir_Kind_Noise_Quantity_Declaration => 956, - Iir_Kind_Across_Quantity_Declaration => 972, - Iir_Kind_Through_Quantity_Declaration => 988, - Iir_Kind_File_Declaration => 1003, - Iir_Kind_Guard_Signal_Declaration => 1017, - Iir_Kind_Signal_Declaration => 1034, - Iir_Kind_Variable_Declaration => 1047, - Iir_Kind_Constant_Declaration => 1061, - Iir_Kind_Iterator_Declaration => 1073, - Iir_Kind_Interface_Constant_Declaration => 1090, - Iir_Kind_Interface_Variable_Declaration => 1106, - Iir_Kind_Interface_Signal_Declaration => 1127, - Iir_Kind_Interface_File_Declaration => 1143, - Iir_Kind_Interface_Quantity_Declaration => 1159, - Iir_Kind_Interface_Terminal_Declaration => 1171, - Iir_Kind_Interface_Type_Declaration => 1182, - Iir_Kind_Interface_Package_Declaration => 1195, - Iir_Kind_Interface_Function_Declaration => 1213, - Iir_Kind_Interface_Procedure_Declaration => 1227, - Iir_Kind_Signal_Attribute_Declaration => 1230, - Iir_Kind_Suspend_State_Declaration => 1233, - Iir_Kind_Identity_Operator => 1237, - Iir_Kind_Negation_Operator => 1241, - Iir_Kind_Absolute_Operator => 1245, - Iir_Kind_Not_Operator => 1249, - Iir_Kind_Implicit_Condition_Operator => 1253, - Iir_Kind_Condition_Operator => 1257, - Iir_Kind_Reduction_And_Operator => 1261, - Iir_Kind_Reduction_Or_Operator => 1265, - Iir_Kind_Reduction_Nand_Operator => 1269, - Iir_Kind_Reduction_Nor_Operator => 1273, - Iir_Kind_Reduction_Xor_Operator => 1277, - Iir_Kind_Reduction_Xnor_Operator => 1281, - Iir_Kind_And_Operator => 1286, - Iir_Kind_Or_Operator => 1291, - Iir_Kind_Nand_Operator => 1296, - Iir_Kind_Nor_Operator => 1301, - Iir_Kind_Xor_Operator => 1306, - Iir_Kind_Xnor_Operator => 1311, - Iir_Kind_Equality_Operator => 1316, - Iir_Kind_Inequality_Operator => 1321, - Iir_Kind_Less_Than_Operator => 1326, - Iir_Kind_Less_Than_Or_Equal_Operator => 1331, - Iir_Kind_Greater_Than_Operator => 1336, - Iir_Kind_Greater_Than_Or_Equal_Operator => 1341, - Iir_Kind_Match_Equality_Operator => 1346, - Iir_Kind_Match_Inequality_Operator => 1351, - Iir_Kind_Match_Less_Than_Operator => 1356, - Iir_Kind_Match_Less_Than_Or_Equal_Operator => 1361, - Iir_Kind_Match_Greater_Than_Operator => 1366, - Iir_Kind_Match_Greater_Than_Or_Equal_Operator => 1371, - Iir_Kind_Sll_Operator => 1376, - Iir_Kind_Sla_Operator => 1381, - Iir_Kind_Srl_Operator => 1386, - Iir_Kind_Sra_Operator => 1391, - Iir_Kind_Rol_Operator => 1396, - Iir_Kind_Ror_Operator => 1401, - Iir_Kind_Addition_Operator => 1406, - Iir_Kind_Substraction_Operator => 1411, - Iir_Kind_Concatenation_Operator => 1416, - Iir_Kind_Multiplication_Operator => 1421, - Iir_Kind_Division_Operator => 1426, - Iir_Kind_Modulus_Operator => 1431, - Iir_Kind_Remainder_Operator => 1436, - Iir_Kind_Exponentiation_Operator => 1441, - Iir_Kind_Function_Call => 1449, - Iir_Kind_Aggregate => 1456, - Iir_Kind_Parenthesis_Expression => 1459, - Iir_Kind_Qualified_Expression => 1463, - Iir_Kind_Type_Conversion => 1468, - Iir_Kind_Allocator_By_Expression => 1473, - Iir_Kind_Allocator_By_Subtype => 1479, - Iir_Kind_Selected_Element => 1487, - Iir_Kind_Dereference => 1492, - Iir_Kind_Implicit_Dereference => 1497, - Iir_Kind_Slice_Name => 1504, - Iir_Kind_Indexed_Name => 1510, - Iir_Kind_Psl_Prev => 1516, - Iir_Kind_Psl_Stable => 1521, - Iir_Kind_Psl_Rose => 1526, - Iir_Kind_Psl_Fell => 1531, - Iir_Kind_Psl_Onehot => 1534, - Iir_Kind_Psl_Onehot0 => 1537, - Iir_Kind_Psl_Expression => 1539, - Iir_Kind_Sensitized_Process_Statement => 1560, - Iir_Kind_Process_Statement => 1580, - Iir_Kind_Concurrent_Simple_Signal_Assignment => 1593, - Iir_Kind_Concurrent_Conditional_Signal_Assignment => 1606, - Iir_Kind_Concurrent_Selected_Signal_Assignment => 1620, - Iir_Kind_Concurrent_Assertion_Statement => 1628, - Iir_Kind_Concurrent_Procedure_Call_Statement => 1635, - Iir_Kind_Concurrent_Break_Statement => 1643, - Iir_Kind_Psl_Assert_Directive => 1657, - Iir_Kind_Psl_Assume_Directive => 1669, - Iir_Kind_Psl_Cover_Directive => 1681, - Iir_Kind_Psl_Restrict_Directive => 1692, - Iir_Kind_Block_Statement => 1706, - Iir_Kind_If_Generate_Statement => 1717, - Iir_Kind_Case_Generate_Statement => 1726, - Iir_Kind_For_Generate_Statement => 1735, - Iir_Kind_Component_Instantiation_Statement => 1746, - Iir_Kind_Psl_Default_Clock => 1749, - Iir_Kind_Generate_Statement_Body => 1760, - Iir_Kind_If_Generate_Else_Clause => 1766, - Iir_Kind_Simple_Simultaneous_Statement => 1773, - Iir_Kind_Simultaneous_Null_Statement => 1777, - Iir_Kind_Simultaneous_Procedural_Statement => 1788, - Iir_Kind_Simultaneous_Case_Statement => 1797, - Iir_Kind_Simultaneous_If_Statement => 1806, - Iir_Kind_Simultaneous_Elsif => 1812, - Iir_Kind_Simple_Signal_Assignment_Statement => 1823, - Iir_Kind_Conditional_Signal_Assignment_Statement => 1834, - Iir_Kind_Selected_Waveform_Assignment_Statement => 1846, - Iir_Kind_Signal_Force_Assignment_Statement => 1856, - Iir_Kind_Signal_Release_Assignment_Statement => 1865, - Iir_Kind_Null_Statement => 1869, - Iir_Kind_Assertion_Statement => 1876, - Iir_Kind_Report_Statement => 1882, - Iir_Kind_Wait_Statement => 1890, - Iir_Kind_Variable_Assignment_Statement => 1897, - Iir_Kind_Conditional_Variable_Assignment_Statement => 1904, - Iir_Kind_Return_Statement => 1910, - Iir_Kind_For_Loop_Statement => 1921, - Iir_Kind_While_Loop_Statement => 1932, - Iir_Kind_Next_Statement => 1939, - Iir_Kind_Exit_Statement => 1946, - Iir_Kind_Case_Statement => 1955, - Iir_Kind_Procedure_Call_Statement => 1961, - Iir_Kind_Break_Statement => 1968, - Iir_Kind_If_Statement => 1978, - Iir_Kind_Suspend_State_Statement => 1982, - Iir_Kind_Elsif => 1988, - Iir_Kind_Character_Literal => 1995, - Iir_Kind_Simple_Name => 2002, - Iir_Kind_Selected_Name => 2010, - Iir_Kind_Operator_Symbol => 2015, - Iir_Kind_Reference_Name => 2020, - Iir_Kind_External_Constant_Name => 2029, - Iir_Kind_External_Signal_Name => 2038, - Iir_Kind_External_Variable_Name => 2048, - Iir_Kind_Selected_By_All_Name => 2054, - Iir_Kind_Parenthesis_Name => 2059, - Iir_Kind_Package_Pathname => 2063, - Iir_Kind_Absolute_Pathname => 2064, - Iir_Kind_Relative_Pathname => 2065, - Iir_Kind_Pathname_Element => 2070, - Iir_Kind_Base_Attribute => 2072, - Iir_Kind_Subtype_Attribute => 2077, - Iir_Kind_Element_Attribute => 2082, - Iir_Kind_Across_Attribute => 2087, - Iir_Kind_Through_Attribute => 2092, - Iir_Kind_Nature_Reference_Attribute => 2096, - Iir_Kind_Left_Type_Attribute => 2101, - Iir_Kind_Right_Type_Attribute => 2106, - Iir_Kind_High_Type_Attribute => 2111, - Iir_Kind_Low_Type_Attribute => 2116, - Iir_Kind_Ascending_Type_Attribute => 2121, - Iir_Kind_Image_Attribute => 2127, - Iir_Kind_Value_Attribute => 2133, - Iir_Kind_Pos_Attribute => 2139, - Iir_Kind_Val_Attribute => 2145, - Iir_Kind_Succ_Attribute => 2151, - Iir_Kind_Pred_Attribute => 2157, - Iir_Kind_Leftof_Attribute => 2163, - Iir_Kind_Rightof_Attribute => 2169, - Iir_Kind_Signal_Slew_Attribute => 2177, - Iir_Kind_Quantity_Slew_Attribute => 2185, - Iir_Kind_Ramp_Attribute => 2193, - Iir_Kind_Zoh_Attribute => 2201, - Iir_Kind_Ltf_Attribute => 2209, - Iir_Kind_Ztf_Attribute => 2219, - Iir_Kind_Dot_Attribute => 2226, - Iir_Kind_Integ_Attribute => 2233, - Iir_Kind_Above_Attribute => 2241, - Iir_Kind_Quantity_Delayed_Attribute => 2249, - Iir_Kind_Delayed_Attribute => 2258, - Iir_Kind_Stable_Attribute => 2267, - Iir_Kind_Quiet_Attribute => 2276, - Iir_Kind_Transaction_Attribute => 2285, - Iir_Kind_Event_Attribute => 2289, - Iir_Kind_Active_Attribute => 2293, - Iir_Kind_Last_Event_Attribute => 2297, - Iir_Kind_Last_Active_Attribute => 2301, - Iir_Kind_Last_Value_Attribute => 2305, - Iir_Kind_Driving_Attribute => 2309, - Iir_Kind_Driving_Value_Attribute => 2313, - Iir_Kind_Behavior_Attribute => 2313, - Iir_Kind_Structure_Attribute => 2313, - Iir_Kind_Simple_Name_Attribute => 2320, - Iir_Kind_Instance_Name_Attribute => 2325, - Iir_Kind_Path_Name_Attribute => 2330, - Iir_Kind_Left_Array_Attribute => 2337, - Iir_Kind_Right_Array_Attribute => 2344, - Iir_Kind_High_Array_Attribute => 2351, - Iir_Kind_Low_Array_Attribute => 2358, - Iir_Kind_Length_Array_Attribute => 2365, - Iir_Kind_Ascending_Array_Attribute => 2372, - Iir_Kind_Range_Array_Attribute => 2379, - Iir_Kind_Reverse_Range_Array_Attribute => 2386, - Iir_Kind_Attribute_Name => 2395 + Iir_Kind_Signature => 239, + Iir_Kind_Aggregate_Info => 246, + Iir_Kind_Procedure_Call => 250, + Iir_Kind_Record_Element_Constraint => 258, + Iir_Kind_Array_Element_Resolution => 260, + Iir_Kind_Record_Resolution => 261, + Iir_Kind_Record_Element_Resolution => 264, + Iir_Kind_Break_Element => 268, + Iir_Kind_Attribute_Specification => 277, + Iir_Kind_Disconnection_Specification => 283, + Iir_Kind_Step_Limit_Specification => 289, + Iir_Kind_Configuration_Specification => 295, + Iir_Kind_Access_Type_Definition => 302, + Iir_Kind_Incomplete_Type_Definition => 309, + Iir_Kind_Interface_Type_Definition => 315, + Iir_Kind_File_Type_Definition => 321, + Iir_Kind_Protected_Type_Declaration => 331, + Iir_Kind_Record_Type_Definition => 341, + Iir_Kind_Array_Type_Definition => 352, + Iir_Kind_Array_Subtype_Definition => 369, + Iir_Kind_Record_Subtype_Definition => 382, + Iir_Kind_Access_Subtype_Definition => 390, + Iir_Kind_Physical_Subtype_Definition => 400, + Iir_Kind_Floating_Subtype_Definition => 411, + Iir_Kind_Integer_Subtype_Definition => 421, + Iir_Kind_Enumeration_Subtype_Definition => 431, + Iir_Kind_Enumeration_Type_Definition => 442, + Iir_Kind_Integer_Type_Definition => 450, + Iir_Kind_Floating_Type_Definition => 458, + Iir_Kind_Physical_Type_Definition => 469, + Iir_Kind_Range_Expression => 477, + Iir_Kind_Protected_Type_Body => 485, + Iir_Kind_Wildcard_Type_Definition => 489, + Iir_Kind_Foreign_Vector_Type_Definition => 490, + Iir_Kind_Subtype_Definition => 497, + Iir_Kind_Scalar_Nature_Definition => 505, + Iir_Kind_Record_Nature_Definition => 518, + Iir_Kind_Array_Nature_Definition => 532, + Iir_Kind_Array_Subnature_Definition => 547, + Iir_Kind_Overload_List => 548, + Iir_Kind_Foreign_Module => 553, + Iir_Kind_Entity_Declaration => 566, + Iir_Kind_Configuration_Declaration => 576, + Iir_Kind_Context_Declaration => 582, + Iir_Kind_Package_Declaration => 597, + Iir_Kind_Package_Instantiation_Declaration => 611, + Iir_Kind_Vmode_Declaration => 623, + Iir_Kind_Vprop_Declaration => 635, + Iir_Kind_Vunit_Declaration => 648, + Iir_Kind_Package_Body => 656, + Iir_Kind_Architecture_Body => 669, + Iir_Kind_Type_Declaration => 676, + Iir_Kind_Anonymous_Type_Declaration => 682, + Iir_Kind_Subtype_Declaration => 690, + Iir_Kind_Nature_Declaration => 696, + Iir_Kind_Subnature_Declaration => 703, + Iir_Kind_Package_Header => 705, + Iir_Kind_Unit_Declaration => 714, + Iir_Kind_Library_Declaration => 722, + Iir_Kind_Component_Declaration => 732, + Iir_Kind_Attribute_Declaration => 739, + Iir_Kind_Group_Template_Declaration => 745, + Iir_Kind_Group_Declaration => 752, + Iir_Kind_Element_Declaration => 760, + Iir_Kind_Nature_Element_Declaration => 767, + Iir_Kind_Non_Object_Alias_Declaration => 775, + Iir_Kind_Psl_Declaration => 783, + Iir_Kind_Psl_Endpoint_Declaration => 797, + Iir_Kind_Enumeration_Literal => 809, + Iir_Kind_Function_Declaration => 835, + Iir_Kind_Procedure_Declaration => 858, + Iir_Kind_Function_Body => 868, + Iir_Kind_Procedure_Body => 879, + Iir_Kind_Function_Instantiation_Declaration => 890, + Iir_Kind_Procedure_Instantiation_Declaration => 900, + Iir_Kind_Terminal_Declaration => 909, + Iir_Kind_Object_Alias_Declaration => 921, + Iir_Kind_Free_Quantity_Declaration => 933, + Iir_Kind_Spectrum_Quantity_Declaration => 946, + Iir_Kind_Noise_Quantity_Declaration => 958, + Iir_Kind_Across_Quantity_Declaration => 974, + Iir_Kind_Through_Quantity_Declaration => 990, + Iir_Kind_File_Declaration => 1005, + Iir_Kind_Guard_Signal_Declaration => 1019, + Iir_Kind_Signal_Declaration => 1036, + Iir_Kind_Variable_Declaration => 1049, + Iir_Kind_Constant_Declaration => 1063, + Iir_Kind_Iterator_Declaration => 1075, + Iir_Kind_Interface_Constant_Declaration => 1092, + Iir_Kind_Interface_Variable_Declaration => 1108, + Iir_Kind_Interface_Signal_Declaration => 1129, + Iir_Kind_Interface_File_Declaration => 1145, + Iir_Kind_Interface_Quantity_Declaration => 1161, + Iir_Kind_Interface_Terminal_Declaration => 1173, + Iir_Kind_Interface_Type_Declaration => 1184, + Iir_Kind_Interface_Package_Declaration => 1197, + Iir_Kind_Interface_Function_Declaration => 1215, + Iir_Kind_Interface_Procedure_Declaration => 1229, + Iir_Kind_Signal_Attribute_Declaration => 1232, + Iir_Kind_Suspend_State_Declaration => 1235, + Iir_Kind_Identity_Operator => 1239, + Iir_Kind_Negation_Operator => 1243, + Iir_Kind_Absolute_Operator => 1247, + Iir_Kind_Not_Operator => 1251, + Iir_Kind_Implicit_Condition_Operator => 1255, + Iir_Kind_Condition_Operator => 1259, + Iir_Kind_Reduction_And_Operator => 1263, + Iir_Kind_Reduction_Or_Operator => 1267, + Iir_Kind_Reduction_Nand_Operator => 1271, + Iir_Kind_Reduction_Nor_Operator => 1275, + Iir_Kind_Reduction_Xor_Operator => 1279, + Iir_Kind_Reduction_Xnor_Operator => 1283, + Iir_Kind_And_Operator => 1288, + Iir_Kind_Or_Operator => 1293, + Iir_Kind_Nand_Operator => 1298, + Iir_Kind_Nor_Operator => 1303, + Iir_Kind_Xor_Operator => 1308, + Iir_Kind_Xnor_Operator => 1313, + Iir_Kind_Equality_Operator => 1318, + Iir_Kind_Inequality_Operator => 1323, + Iir_Kind_Less_Than_Operator => 1328, + Iir_Kind_Less_Than_Or_Equal_Operator => 1333, + Iir_Kind_Greater_Than_Operator => 1338, + Iir_Kind_Greater_Than_Or_Equal_Operator => 1343, + Iir_Kind_Match_Equality_Operator => 1348, + Iir_Kind_Match_Inequality_Operator => 1353, + Iir_Kind_Match_Less_Than_Operator => 1358, + Iir_Kind_Match_Less_Than_Or_Equal_Operator => 1363, + Iir_Kind_Match_Greater_Than_Operator => 1368, + Iir_Kind_Match_Greater_Than_Or_Equal_Operator => 1373, + Iir_Kind_Sll_Operator => 1378, + Iir_Kind_Sla_Operator => 1383, + Iir_Kind_Srl_Operator => 1388, + Iir_Kind_Sra_Operator => 1393, + Iir_Kind_Rol_Operator => 1398, + Iir_Kind_Ror_Operator => 1403, + Iir_Kind_Addition_Operator => 1408, + Iir_Kind_Substraction_Operator => 1413, + Iir_Kind_Concatenation_Operator => 1418, + Iir_Kind_Multiplication_Operator => 1423, + Iir_Kind_Division_Operator => 1428, + Iir_Kind_Modulus_Operator => 1433, + Iir_Kind_Remainder_Operator => 1438, + Iir_Kind_Exponentiation_Operator => 1443, + Iir_Kind_Function_Call => 1451, + Iir_Kind_Aggregate => 1458, + Iir_Kind_Parenthesis_Expression => 1461, + Iir_Kind_Qualified_Expression => 1465, + Iir_Kind_Type_Conversion => 1470, + Iir_Kind_Allocator_By_Expression => 1475, + Iir_Kind_Allocator_By_Subtype => 1481, + Iir_Kind_Selected_Element => 1489, + Iir_Kind_Dereference => 1494, + Iir_Kind_Implicit_Dereference => 1499, + Iir_Kind_Slice_Name => 1506, + Iir_Kind_Indexed_Name => 1512, + Iir_Kind_Psl_Prev => 1518, + Iir_Kind_Psl_Stable => 1523, + Iir_Kind_Psl_Rose => 1528, + Iir_Kind_Psl_Fell => 1533, + Iir_Kind_Psl_Onehot => 1536, + Iir_Kind_Psl_Onehot0 => 1539, + Iir_Kind_Psl_Expression => 1541, + Iir_Kind_Sensitized_Process_Statement => 1562, + Iir_Kind_Process_Statement => 1582, + Iir_Kind_Concurrent_Simple_Signal_Assignment => 1595, + Iir_Kind_Concurrent_Conditional_Signal_Assignment => 1608, + Iir_Kind_Concurrent_Selected_Signal_Assignment => 1622, + Iir_Kind_Concurrent_Assertion_Statement => 1630, + Iir_Kind_Concurrent_Procedure_Call_Statement => 1637, + Iir_Kind_Concurrent_Break_Statement => 1645, + Iir_Kind_Psl_Assert_Directive => 1659, + Iir_Kind_Psl_Assume_Directive => 1671, + Iir_Kind_Psl_Cover_Directive => 1683, + Iir_Kind_Psl_Restrict_Directive => 1694, + Iir_Kind_Block_Statement => 1708, + Iir_Kind_If_Generate_Statement => 1719, + Iir_Kind_Case_Generate_Statement => 1728, + Iir_Kind_For_Generate_Statement => 1737, + Iir_Kind_Component_Instantiation_Statement => 1748, + Iir_Kind_Psl_Default_Clock => 1751, + Iir_Kind_Generate_Statement_Body => 1762, + Iir_Kind_If_Generate_Else_Clause => 1768, + Iir_Kind_Simple_Simultaneous_Statement => 1775, + Iir_Kind_Simultaneous_Null_Statement => 1779, + Iir_Kind_Simultaneous_Procedural_Statement => 1790, + Iir_Kind_Simultaneous_Case_Statement => 1799, + Iir_Kind_Simultaneous_If_Statement => 1808, + Iir_Kind_Simultaneous_Elsif => 1814, + Iir_Kind_Simple_Signal_Assignment_Statement => 1825, + Iir_Kind_Conditional_Signal_Assignment_Statement => 1836, + Iir_Kind_Selected_Waveform_Assignment_Statement => 1848, + Iir_Kind_Signal_Force_Assignment_Statement => 1858, + Iir_Kind_Signal_Release_Assignment_Statement => 1867, + Iir_Kind_Null_Statement => 1871, + Iir_Kind_Assertion_Statement => 1878, + Iir_Kind_Report_Statement => 1884, + Iir_Kind_Wait_Statement => 1892, + Iir_Kind_Variable_Assignment_Statement => 1899, + Iir_Kind_Conditional_Variable_Assignment_Statement => 1906, + Iir_Kind_Return_Statement => 1912, + Iir_Kind_For_Loop_Statement => 1923, + Iir_Kind_While_Loop_Statement => 1934, + Iir_Kind_Next_Statement => 1941, + Iir_Kind_Exit_Statement => 1948, + Iir_Kind_Case_Statement => 1957, + Iir_Kind_Procedure_Call_Statement => 1963, + Iir_Kind_Break_Statement => 1970, + Iir_Kind_If_Statement => 1980, + Iir_Kind_Suspend_State_Statement => 1984, + Iir_Kind_Elsif => 1990, + Iir_Kind_Character_Literal => 1997, + Iir_Kind_Simple_Name => 2004, + Iir_Kind_Selected_Name => 2012, + Iir_Kind_Operator_Symbol => 2017, + Iir_Kind_Reference_Name => 2022, + Iir_Kind_External_Constant_Name => 2031, + Iir_Kind_External_Signal_Name => 2040, + Iir_Kind_External_Variable_Name => 2050, + Iir_Kind_Selected_By_All_Name => 2056, + Iir_Kind_Parenthesis_Name => 2061, + Iir_Kind_Package_Pathname => 2065, + Iir_Kind_Absolute_Pathname => 2066, + Iir_Kind_Relative_Pathname => 2067, + Iir_Kind_Pathname_Element => 2072, + Iir_Kind_Base_Attribute => 2074, + Iir_Kind_Subtype_Attribute => 2079, + Iir_Kind_Element_Attribute => 2084, + Iir_Kind_Across_Attribute => 2089, + Iir_Kind_Through_Attribute => 2094, + Iir_Kind_Nature_Reference_Attribute => 2098, + Iir_Kind_Left_Type_Attribute => 2103, + Iir_Kind_Right_Type_Attribute => 2108, + Iir_Kind_High_Type_Attribute => 2113, + Iir_Kind_Low_Type_Attribute => 2118, + Iir_Kind_Ascending_Type_Attribute => 2123, + Iir_Kind_Image_Attribute => 2129, + Iir_Kind_Value_Attribute => 2135, + Iir_Kind_Pos_Attribute => 2141, + Iir_Kind_Val_Attribute => 2147, + Iir_Kind_Succ_Attribute => 2153, + Iir_Kind_Pred_Attribute => 2159, + Iir_Kind_Leftof_Attribute => 2165, + Iir_Kind_Rightof_Attribute => 2171, + Iir_Kind_Signal_Slew_Attribute => 2179, + Iir_Kind_Quantity_Slew_Attribute => 2187, + Iir_Kind_Ramp_Attribute => 2195, + Iir_Kind_Zoh_Attribute => 2203, + Iir_Kind_Ltf_Attribute => 2211, + Iir_Kind_Ztf_Attribute => 2221, + Iir_Kind_Dot_Attribute => 2228, + Iir_Kind_Integ_Attribute => 2235, + Iir_Kind_Above_Attribute => 2243, + Iir_Kind_Quantity_Delayed_Attribute => 2251, + Iir_Kind_Delayed_Attribute => 2260, + Iir_Kind_Stable_Attribute => 2269, + Iir_Kind_Quiet_Attribute => 2278, + Iir_Kind_Transaction_Attribute => 2287, + Iir_Kind_Event_Attribute => 2291, + Iir_Kind_Active_Attribute => 2295, + Iir_Kind_Last_Event_Attribute => 2299, + Iir_Kind_Last_Active_Attribute => 2303, + Iir_Kind_Last_Value_Attribute => 2307, + Iir_Kind_Driving_Attribute => 2311, + Iir_Kind_Driving_Value_Attribute => 2315, + Iir_Kind_Behavior_Attribute => 2315, + Iir_Kind_Structure_Attribute => 2315, + Iir_Kind_Simple_Name_Attribute => 2322, + Iir_Kind_Instance_Name_Attribute => 2327, + Iir_Kind_Path_Name_Attribute => 2332, + Iir_Kind_Left_Array_Attribute => 2339, + Iir_Kind_Right_Array_Attribute => 2346, + Iir_Kind_High_Array_Attribute => 2353, + Iir_Kind_Low_Array_Attribute => 2360, + Iir_Kind_Length_Array_Attribute => 2367, + Iir_Kind_Ascending_Array_Attribute => 2374, + Iir_Kind_Range_Array_Attribute => 2381, + Iir_Kind_Reverse_Range_Array_Attribute => 2388, + Iir_Kind_Attribute_Name => 2397 ); function Get_Fields_First (K : Iir_Kind) return Fields_Index is @@ -11173,7 +11175,8 @@ package body Vhdl.Nodes_Meta is function Has_Named_Entity (K : Iir_Kind) return Boolean is begin case K is - when Iir_Kind_Selected_Element + when Iir_Kind_Signature + | Iir_Kind_Selected_Element | Iir_Kind_Character_Literal | Iir_Kind_Simple_Name | Iir_Kind_Selected_Name @@ -12622,7 +12625,8 @@ package body Vhdl.Nodes_Meta is function Has_Is_Forward_Ref (K : Iir_Kind) return Boolean is begin case K is - when Iir_Kind_Selected_Element + when Iir_Kind_Signature + | Iir_Kind_Selected_Element | Iir_Kind_Character_Literal | Iir_Kind_Simple_Name | Iir_Kind_Selected_Name diff --git a/src/vhdl/vhdl-sem_names.adb b/src/vhdl/vhdl-sem_names.adb index 9dd2b4bd2..c9420ba4b 100644 --- a/src/vhdl/vhdl-sem_names.adb +++ b/src/vhdl/vhdl-sem_names.adb @@ -4609,6 +4609,9 @@ package body Vhdl.Sem_Names is Sem_Attribute_Name (Name); when Iir_Kinds_External_Name => Sem_External_Name (Name); + when Iir_Kind_Signature => + Error_Msg_Sem (+Name, "signature cannot be used here"); + Set_Named_Entity (Name, Create_Error_Name (Name)); when others => Error_Kind ("sem_name", Name); end case; |