aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2016-09-04 20:20:29 +0200
committerTristan Gingold <tgingold@free.fr>2016-09-04 20:20:29 +0200
commitac03fdc89c3bcc3cd08eed179113309835f9b4fb (patch)
treed9fc971e69225d908036069f204bf0c8486f1cd1
parentd99f387f2391531eeba31a0cd143a39a2b6cd011 (diff)
downloadghdl-ac03fdc89c3bcc3cd08eed179113309835f9b4fb.tar.gz
ghdl-ac03fdc89c3bcc3cd08eed179113309835f9b4fb.tar.bz2
ghdl-ac03fdc89c3bcc3cd08eed179113309835f9b4fb.zip
Add testcase for previous commit.
-rw-r--r--testsuite/gna/bug053/tb1.vhdl12
-rw-r--r--testsuite/gna/bug053/tb2.vhdl17
-rw-r--r--testsuite/gna/bug053/tb3.on2170
-rw-r--r--testsuite/gna/bug053/tb3.vhdl28
-rwxr-xr-xtestsuite/gna/bug053/testsuite.sh17
5 files changed, 2244 insertions, 0 deletions
diff --git a/testsuite/gna/bug053/tb1.vhdl b/testsuite/gna/bug053/tb1.vhdl
new file mode 100644
index 000000000..8431dc71f
--- /dev/null
+++ b/testsuite/gna/bug053/tb1.vhdl
@@ -0,0 +1,12 @@
+entity tb1 is
+ package pkg1 is
+ constant c : natural := 5;
+ function f return natural;
+ end pkg1;
+end tb1;
+
+architecture behav of tb1 is
+begin
+ assert pkg1.c = 5 severity failure;
+ assert pkg1.c /= 5 report "value is correct" severity note;
+end behav;
diff --git a/testsuite/gna/bug053/tb2.vhdl b/testsuite/gna/bug053/tb2.vhdl
new file mode 100644
index 000000000..efda78609
--- /dev/null
+++ b/testsuite/gna/bug053/tb2.vhdl
@@ -0,0 +1,17 @@
+package pkg2 is
+ package pkg1 is
+ constant c : natural := 5;
+-- function f return natural;
+ end pkg1;
+end pkg2;
+
+entity tb2 is
+end tb2;
+
+use work.pkg2.all;
+
+architecture behav of tb2 is
+begin
+ assert pkg1.c = 5 severity failure;
+ assert pkg1.c /= 5 report "value is correct" severity note;
+end behav;
diff --git a/testsuite/gna/bug053/tb3.on b/testsuite/gna/bug053/tb3.on
new file mode 100644
index 000000000..a525a49e4
--- /dev/null
+++ b/testsuite/gna/bug053/tb3.on
@@ -0,0 +1,2170 @@
+-- internal declarations, part 1
+
+TYPE __ghdl_size_type IS UNSIGNED (32);
+
+TYPE __ghdl_index_type IS UNSIGNED (32);
+
+TYPE __ghdl_i32 IS SIGNED (32);
+
+TYPE __ghdl_real IS FLOAT;
+
+TYPE __ghdl_i64 IS SIGNED (64);
+
+TYPE __ghdl_file_index IS UNSIGNED (32);
+
+TYPE __ghdl_file_index_ptr IS ACCESS __ghdl_file_index;
+
+TYPE __ghdl_char IS UNSIGNED (8);
+
+TYPE __ghdl_chararray IS ARRAY [__ghdl_index_type] OF __ghdl_char;
+
+TYPE __ghdl_char_ptr IS ACCESS __ghdl_chararray;
+
+TYPE __ghdl_char_ptr_array IS ARRAY [__ghdl_index_type] OF __ghdl_char_ptr;
+
+TYPE __ghdl_char_ptr_array_ptr IS ACCESS __ghdl_char_ptr_array;
+
+TYPE __ghdl_ptr IS ACCESS __ghdl_char;
+
+TYPE __ghdl_str_len IS RECORD
+ len: __ghdl_index_type;
+ str: __ghdl_char_ptr;
+END RECORD;
+
+TYPE __ghdl_str_len_array IS ARRAY [__ghdl_index_type] OF __ghdl_str_len;
+
+TYPE __ghdl_str_len_ptr IS ACCESS __ghdl_str_len;
+
+TYPE __ghdl_bool_type IS BOOLEAN {false, true};
+
+TYPE __ghdl_bool_array_type IS ARRAY [__ghdl_index_type] OF __ghdl_bool_type;
+
+TYPE __ghdl_bool_array_ptr IS ACCESS __ghdl_bool_array_type;
+
+TYPE __ghdl_compare_type IS ENUM {lt, eq, gt};
+
+TYPE __ghdl_location IS RECORD
+ filename: __ghdl_char_ptr;
+ line: __ghdl_i32;
+ col: __ghdl_i32;
+END RECORD;
+
+TYPE __ghdl_location_ptr IS ACCESS __ghdl_location;
+
+TYPE __ghdl_dir_type IS ENUM {dir_to, dir_downto};
+
+TYPE __ghdl_signal IS RECORD;
+
+TYPE __ghdl_signal_ptr IS ACCESS __ghdl_signal;
+
+EXTERNAL FUNCTION __ghdl_alloc (
+ size: __ghdl_size_type)
+ RETURN __ghdl_ptr;
+
+EXTERNAL PROCEDURE __ghdl_program_error (
+ filename: __ghdl_char_ptr;
+ line: __ghdl_i32;
+ code: __ghdl_index_type);
+
+EXTERNAL PROCEDURE __ghdl_bound_check_failed_l1 (
+ filename: __ghdl_char_ptr;
+ line: __ghdl_i32);
+
+EXTERNAL FUNCTION __ghdl_stack2_allocate (
+ size: __ghdl_index_type)
+ RETURN __ghdl_ptr;
+
+EXTERNAL FUNCTION __ghdl_stack2_mark (
+ )
+ RETURN __ghdl_ptr;
+
+EXTERNAL PROCEDURE __ghdl_stack2_release (
+ mark: __ghdl_ptr);
+
+EXTERNAL PROCEDURE __ghdl_memcpy (
+ dest: __ghdl_ptr;
+ src: __ghdl_ptr;
+ length: __ghdl_index_type);
+
+EXTERNAL PROCEDURE __ghdl_deallocate (
+ OBJ: __ghdl_ptr);
+
+EXTERNAL FUNCTION __ghdl_malloc (
+ length: __ghdl_index_type)
+ RETURN __ghdl_ptr;
+
+EXTERNAL FUNCTION __ghdl_malloc0 (
+ length: __ghdl_index_type)
+ RETURN __ghdl_ptr;
+
+EXTERNAL FUNCTION __ghdl_text_file_elaborate (
+ )
+ RETURN __ghdl_file_index;
+
+EXTERNAL FUNCTION __ghdl_file_elaborate (
+ NAME: __ghdl_char_ptr)
+ RETURN __ghdl_file_index;
+
+EXTERNAL PROCEDURE __ghdl_file_finalize (
+ file: __ghdl_file_index);
+
+EXTERNAL PROCEDURE __ghdl_text_file_finalize (
+ file: __ghdl_file_index);
+
+EXTERNAL PROCEDURE __ghdl_protected_enter (
+ OBJ: __ghdl_ptr);
+
+EXTERNAL PROCEDURE __ghdl_protected_leave (
+ OBJ: __ghdl_ptr);
+
+EXTERNAL PROCEDURE __ghdl_protected_init (
+ OBJ: __ghdl_ptr);
+
+EXTERNAL PROCEDURE __ghdl_protected_fini (
+ OBJ: __ghdl_ptr);
+
+TYPE __ghdl_rtik IS ENUM {__ghdl_rtik_top, __ghdl_rtik_library,
+ __ghdl_rtik_package, __ghdl_rtik_package_body, __ghdl_rtik_entity,
+ __ghdl_rtik_architecture, __ghdl_rtik_process, __ghdl_rtik_block,
+ __ghdl_rtik_if_generate, __ghdl_rtik_case_generate,
+ __ghdl_rtik_for_generate, __ghdl_rtik_generate_body, __ghdl_rtik_instance,
+ __ghdl_rtik_constant, __ghdl_rtik_iterator, __ghdl_rtik_variable,
+ __ghdl_rtik_signal, __ghdl_rtik_file, __ghdl_rtik_port,
+ __ghdl_rtik_generic, __ghdl_rtik_alias, __ghdl_rtik_guard,
+ __ghdl_rtik_component, __ghdl_rtik_attribute, __ghdl_rtik_type_b1,
+ __ghdl_rtik_type_e8, __ghdl_rtik_type_e32, __ghdl_rtik_type_i32,
+ __ghdl_rtik_type_i64, __ghdl_rtik_type_f64, __ghdl_rtik_type_p32,
+ __ghdl_rtik_type_p64, __ghdl_rtik_type_access, __ghdl_rtik_type_array,
+ __ghdl_rtik_type_record, __ghdl_rtik_type_file, __ghdl_rtik_subtype_scalar,
+ __ghdl_rtik_subtype_array, __ghdl_rtik_subtype_unconstrained_array,
+ __ghdl_rtik_subtype_record, __ghdl_rtik_subtype_access,
+ __ghdl_rtik_type_protected, __ghdl_rtik_element, __ghdl_rtik_unit64,
+ __ghdl_rtik_unitptr, __ghdl_rtik_attribute_transaction,
+ __ghdl_rtik_attribute_quiet, __ghdl_rtik_attribute_stable,
+ __ghdl_rtik_psl_assert, __ghdl_rtik_psl_cover, __ghdl_rtik_psl_endpoint,
+ __ghdl_rtik_error};
+
+TYPE __ghdl_rti_depth IS UNSIGNED (8);
+
+TYPE __ghdl_rti_u8 IS UNSIGNED (8);
+
+TYPE __ghdl_rti_common IS RECORD
+ kind: __ghdl_rtik;
+ depth: __ghdl_rti_depth;
+ mode: __ghdl_rti_u8;
+ max_depth: __ghdl_rti_depth;
+END RECORD;
+
+TYPE __ghdl_rti_access IS ACCESS __ghdl_rti_common;
+
+TYPE __ghdl_rti_array IS ARRAY [__ghdl_index_type] OF __ghdl_rti_access;
+
+TYPE __ghdl_rti_arr_acc IS ACCESS __ghdl_rti_array;
+
+TYPE __ghdl_component_link_type IS RECORD;
+
+TYPE __ghdl_component_link_acc IS ACCESS __ghdl_component_link_type;
+
+TYPE __ghdl_entity_link_type IS RECORD
+ rti: __ghdl_rti_access;
+ parent: __ghdl_component_link_acc;
+END RECORD;
+
+TYPE __ghdl_entity_link_acc IS ACCESS __ghdl_entity_link_type;
+
+TYPE __ghdl_component_link_type IS RECORD
+ INSTANCE: __ghdl_entity_link_acc;
+ stmt: __ghdl_rti_access;
+END RECORD;
+
+TYPE __ghdl_rtin_block IS RECORD
+ common: __ghdl_rti_common;
+ name: __ghdl_char_ptr;
+ loc: __ghdl_ptr;
+ linecol: __ghdl_index_type;
+ parent: __ghdl_rti_access;
+ nbr_child: __ghdl_index_type;
+ children: __ghdl_rti_arr_acc;
+END RECORD;
+
+TYPE __ghdl_rtin_generate IS RECORD
+ common: __ghdl_rti_common;
+ name: __ghdl_char_ptr;
+ loc: __ghdl_ptr;
+ linecol: __ghdl_index_type;
+ parent: __ghdl_rti_access;
+ size: __ghdl_index_type;
+ child: __ghdl_rti_access;
+END RECORD;
+
+TYPE __ghdl_rtin_block_file IS RECORD
+ block: __ghdl_rtin_block;
+ filename: __ghdl_char_ptr;
+END RECORD;
+
+TYPE __ghdl_rtin_type_scalar IS RECORD
+ common: __ghdl_rti_common;
+ name: __ghdl_char_ptr;
+END RECORD;
+
+TYPE __ghdl_rtin_type_enum IS RECORD
+ common: __ghdl_rti_common;
+ name: __ghdl_char_ptr;
+ nbr: __ghdl_index_type;
+ lits: __ghdl_char_ptr_array_ptr;
+END RECORD;
+
+TYPE __ghdl_rtin_subtype_scalar IS RECORD
+ common: __ghdl_rti_common;
+ name: __ghdl_char_ptr;
+ base: __ghdl_rti_access;
+ range: __ghdl_ptr;
+END RECORD;
+
+TYPE __ghdl_rtin_unit64 IS RECORD
+ common: __ghdl_rti_common;
+ name: __ghdl_char_ptr;
+ val: __ghdl_i64;
+END RECORD;
+
+TYPE __ghdl_rtin_unitptr IS RECORD
+ common: __ghdl_rti_common;
+ name: __ghdl_char_ptr;
+ addr: __ghdl_ptr;
+END RECORD;
+
+TYPE __ghdl_rtin_type_physical IS RECORD
+ common: __ghdl_rti_common;
+ name: __ghdl_char_ptr;
+ nbr: __ghdl_index_type;
+ units: __ghdl_rti_arr_acc;
+END RECORD;
+
+TYPE __ghdl_rtin_type_fileacc IS RECORD
+ common: __ghdl_rti_common;
+ name: __ghdl_char_ptr;
+ base: __ghdl_rti_access;
+END RECORD;
+
+TYPE __ghdl_rtin_type_array IS RECORD
+ common: __ghdl_rti_common;
+ name: __ghdl_char_ptr;
+ element: __ghdl_rti_access;
+ nbr_dim: __ghdl_index_type;
+ indexes: __ghdl_rti_arr_acc;
+END RECORD;
+
+TYPE __ghdl_rtin_subtype_array IS RECORD
+ common: __ghdl_rti_common;
+ name: __ghdl_char_ptr;
+ basetype: __ghdl_rti_access;
+ bounds: __ghdl_ptr;
+ val_size: __ghdl_ptr;
+ sig_size: __ghdl_ptr;
+END RECORD;
+
+TYPE __ghdl_rtin_type_record IS RECORD
+ common: __ghdl_rti_common;
+ name: __ghdl_char_ptr;
+ nbrel: __ghdl_index_type;
+ elements: __ghdl_rti_arr_acc;
+END RECORD;
+
+TYPE __ghdl_rtin_element IS RECORD
+ common: __ghdl_rti_common;
+ name: __ghdl_char_ptr;
+ eltype: __ghdl_rti_access;
+ val_off: __ghdl_index_type;
+ sig_off: __ghdl_index_type;
+END RECORD;
+
+TYPE __ghdl_rtin_object IS RECORD
+ common: __ghdl_rti_common;
+ name: __ghdl_char_ptr;
+ loc: __ghdl_ptr;
+ obj_type: __ghdl_rti_access;
+ linecol: __ghdl_index_type;
+END RECORD;
+
+TYPE __ghdl_rtin_instance IS RECORD
+ common: __ghdl_rti_common;
+ name: __ghdl_char_ptr;
+ linecol: __ghdl_index_type;
+ loc: __ghdl_ptr;
+ parent: __ghdl_rti_access;
+ instance: __ghdl_rti_access;
+END RECORD;
+
+TYPE __ghdl_rtin_component IS RECORD
+ common: __ghdl_rti_common;
+ name: __ghdl_char_ptr;
+ nbr_child: __ghdl_index_type;
+ children: __ghdl_rti_arr_acc;
+END RECORD;
+
+EXTERNAL PROCEDURE __ghdl_signal_name_rti (
+ OBJ: __ghdl_rti_access;
+ ctxt: __ghdl_rti_access;
+ addr: __ghdl_ptr);
+
+EXTERNAL PROCEDURE __ghdl_process_register (
+ this: __ghdl_ptr;
+ proc: __ghdl_ptr;
+ ctxt: __ghdl_rti_access;
+ addr: __ghdl_ptr);
+
+EXTERNAL PROCEDURE __ghdl_sensitized_process_register (
+ this: __ghdl_ptr;
+ proc: __ghdl_ptr;
+ ctxt: __ghdl_rti_access;
+ addr: __ghdl_ptr);
+
+EXTERNAL PROCEDURE __ghdl_postponed_process_register (
+ this: __ghdl_ptr;
+ proc: __ghdl_ptr;
+ ctxt: __ghdl_rti_access;
+ addr: __ghdl_ptr);
+
+EXTERNAL PROCEDURE __ghdl_postponed_sensitized_process_register (
+ this: __ghdl_ptr;
+ proc: __ghdl_ptr;
+ ctxt: __ghdl_rti_access;
+ addr: __ghdl_ptr);
+
+EXTERNAL PROCEDURE __ghdl_finalize_register (
+ this: __ghdl_ptr;
+ proc: __ghdl_ptr);
+
+-- package std.standard
+
+TYPE std__standard__boolean IS BOOLEAN {false, true};
+
+TYPE std__standard__boolean__PTR IS ACCESS std__standard__boolean;
+
+TYPE std__standard__boolean__TRT IS RECORD
+ left: std__standard__boolean;
+ right: std__standard__boolean;
+ dir: __ghdl_dir_type;
+ length: __ghdl_index_type;
+END RECORD;
+
+TYPE std__standard__boolean__TRPTR IS ACCESS std__standard__boolean__TRT;
+
+TYPE std__standard__BOOLEAN_ARRAY IS ARRAY [__ghdl_index_type] OF
+ std__standard__boolean;
+
+TYPE std__standard__bit IS BOOLEAN {C_0, C_1};
+
+TYPE std__standard__bit__PTR IS ACCESS std__standard__bit;
+
+TYPE std__standard__bit__TRT IS RECORD
+ left: std__standard__bit;
+ right: std__standard__bit;
+ dir: __ghdl_dir_type;
+ length: __ghdl_index_type;
+END RECORD;
+
+TYPE std__standard__bit__TRPTR IS ACCESS std__standard__bit__TRT;
+
+TYPE std__standard__character IS ENUM {nul, soh, stx, etx, eot, enq, ack, bel,
+ bs, ht, lf, vt, ff, cr, so, si, dle, dc1, dc2, dc3, dc4, nak, syn, etb,
+ can, em, sub, esc, fsp, gsp, rsp, usp, C20, C21, C22, C23, C24, C25, C26,
+ C27, C28, C29, C2a, C2b, C2c, C2d, C2e, C2f, C_0, C_1, C_2, C_3, C_4, C_5,
+ C_6, C_7, C_8, C_9, C3a, C3b, C3c, C3d, C3e, C3f, C40, C_A, C_B, C_C, C_D,
+ C_E, C_F, C_G, C_H, C_I, C_J, C_K, C_L, C_M, C_N, C_O, C_P, C_Q, C_R, C_S,
+ C_T, C_U, C_V, C_W, C_X, C_Y, C_Z, C5b, C5c, C5d, C5e, C5f, C60, C_a, C_b,
+ C_c, C_d, C_e, C_f, C_g, C_h, C_i, C_j, C_k, C_l, C_m, C_n, C_o, C_p, C_q,
+ C_r, C_s, C_t, C_u, C_v, C_w, C_x, C_y, C_z, C7b, C7c, C7d, C7e, del, c128,
+ c129, c130, c131, c132, c133, c134, c135, c136, c137, c138, c139, c140,
+ c141, c142, c143, c144, c145, c146, c147, c148, c149, c150, c151, c152,
+ c153, c154, c155, c156, c157, c158, c159, Ca0, Ca1, Ca2, Ca3, Ca4, Ca5,
+ Ca6, Ca7, Ca8, Ca9, Caa, Cab, Cac, Cad, Cae, Caf, Cb0, Cb1, Cb2, Cb3, Cb4,
+ Cb5, Cb6, Cb7, Cb8, Cb9, Cba, Cbb, Cbc, Cbd, Cbe, Cbf, Cc0, Cc1, Cc2, Cc3,
+ Cc4, Cc5, Cc6, Cc7, Cc8, Cc9, Cca, Ccb, Ccc, Ccd, Cce, Ccf, Cd0, Cd1, Cd2,
+ Cd3, Cd4, Cd5, Cd6, Cd7, Cd8, Cd9, Cda, Cdb, Cdc, Cdd, Cde, Cdf, Ce0, Ce1,
+ Ce2, Ce3, Ce4, Ce5, Ce6, Ce7, Ce8, Ce9, Cea, Ceb, Cec, Ced, Cee, Cef, Cf0,
+ Cf1, Cf2, Cf3, Cf4, Cf5, Cf6, Cf7, Cf8, Cf9, Cfa, Cfb, Cfc, Cfd, Cfe, Cff};
+
+TYPE std__standard__character__PTR IS ACCESS std__standard__character;
+
+TYPE std__standard__character__TRT IS RECORD
+ left: std__standard__character;
+ right: std__standard__character;
+ dir: __ghdl_dir_type;
+ length: __ghdl_index_type;
+END RECORD;
+
+TYPE std__standard__character__TRPTR IS ACCESS std__standard__character__TRT;
+
+EXTERNAL CONSTANT std__standard__character__BTR : std__standard__character__TRT
+ ;
+
+TYPE std__standard__severity_level IS ENUM {note, warning, error, failure};
+
+TYPE std__standard__severity_level__PTR IS ACCESS std__standard__severity_level
+ ;
+
+TYPE std__standard__severity_level__TRT IS RECORD
+ left: std__standard__severity_level;
+ right: std__standard__severity_level;
+ dir: __ghdl_dir_type;
+ length: __ghdl_index_type;
+END RECORD;
+
+TYPE std__standard__severity_level__TRPTR IS ACCESS
+ std__standard__severity_level__TRT;
+
+EXTERNAL CONSTANT std__standard__severity_level__BTR :
+ std__standard__severity_level__TRT;
+
+TYPE std__standard__UNIVERSAL_INTEGER__BT IS SIGNED (64);
+
+TYPE std__standard__UNIVERSAL_INTEGER__BT__PTR IS ACCESS
+ std__standard__UNIVERSAL_INTEGER__BT;
+
+TYPE std__standard__UNIVERSAL_INTEGER__BT__TRT IS RECORD
+ left: std__standard__UNIVERSAL_INTEGER__BT;
+ right: std__standard__UNIVERSAL_INTEGER__BT;
+ dir: __ghdl_dir_type;
+ length: __ghdl_index_type;
+END RECORD;
+
+TYPE std__standard__UNIVERSAL_INTEGER__BT__TRPTR IS ACCESS
+ std__standard__UNIVERSAL_INTEGER__BT__TRT;
+
+EXTERNAL CONSTANT std__standard__UNIVERSAL_INTEGER__STR :
+ std__standard__UNIVERSAL_INTEGER__BT__TRT;
+
+TYPE std__standard__UNIVERSAL_REAL__BT IS FLOAT;
+
+TYPE std__standard__UNIVERSAL_REAL__BT__PTR IS ACCESS
+ std__standard__UNIVERSAL_REAL__BT;
+
+TYPE std__standard__UNIVERSAL_REAL__BT__TRT IS RECORD
+ left: std__standard__UNIVERSAL_REAL__BT;
+ right: std__standard__UNIVERSAL_REAL__BT;
+ dir: __ghdl_dir_type;
+END RECORD;
+
+TYPE std__standard__UNIVERSAL_REAL__BT__TRPTR IS ACCESS
+ std__standard__UNIVERSAL_REAL__BT__TRT;
+
+EXTERNAL CONSTANT std__standard__UNIVERSAL_REAL__STR :
+ std__standard__UNIVERSAL_REAL__BT__TRT;
+
+TYPE std__standard__integer__BT IS SIGNED (32);
+
+TYPE std__standard__integer__BT__PTR IS ACCESS std__standard__integer__BT;
+
+TYPE std__standard__integer__BT__TRT IS RECORD
+ left: std__standard__integer__BT;
+ right: std__standard__integer__BT;
+ dir: __ghdl_dir_type;
+ length: __ghdl_index_type;
+END RECORD;
+
+TYPE std__standard__integer__BT__TRPTR IS ACCESS
+ std__standard__integer__BT__TRT;
+
+EXTERNAL CONSTANT std__standard__integer__STR : std__standard__integer__BT__TRT
+ ;
+
+TYPE std__standard__real__BT IS FLOAT;
+
+TYPE std__standard__real__BT__PTR IS ACCESS std__standard__real__BT;
+
+TYPE std__standard__real__BT__TRT IS RECORD
+ left: std__standard__real__BT;
+ right: std__standard__real__BT;
+ dir: __ghdl_dir_type;
+END RECORD;
+
+TYPE std__standard__real__BT__TRPTR IS ACCESS std__standard__real__BT__TRT;
+
+EXTERNAL CONSTANT std__standard__real__STR : std__standard__real__BT__TRT;
+
+TYPE std__standard__time__BT IS SIGNED (64);
+
+TYPE std__standard__time__BT__PTR IS ACCESS std__standard__time__BT;
+
+TYPE std__standard__time__BT__TRT IS RECORD
+ left: std__standard__time__BT;
+ right: std__standard__time__BT;
+ dir: __ghdl_dir_type;
+END RECORD;
+
+TYPE std__standard__time__BT__TRPTR IS ACCESS std__standard__time__BT__TRT;
+
+EXTERNAL CONSTANT std__standard__time__STR : std__standard__time__BT__TRT;
+
+EXTERNAL CONSTANT std__standard__delay_length__STR :
+ std__standard__time__BT__TRT;
+
+EXTERNAL CONSTANT std__standard__natural__STR : std__standard__integer__BT__TRT
+ ;
+
+EXTERNAL CONSTANT std__standard__positive__STR :
+ std__standard__integer__BT__TRT;
+
+TYPE std__standard__string__BASE IS ARRAY [__ghdl_index_type] OF
+ std__standard__character;
+
+TYPE std__standard__string__BASEP IS ACCESS std__standard__string__BASE;
+
+TYPE std__standard__string__SIGBASE IS ARRAY [__ghdl_index_type] OF
+ __ghdl_signal_ptr;
+
+TYPE std__standard__string__SIGBASEP IS ACCESS std__standard__string__SIGBASE;
+
+TYPE std__standard__string__BOUND IS RECORD
+ dim_1: std__standard__integer__BT__TRT;
+END RECORD;
+
+TYPE std__standard__string__BOUNDP IS ACCESS std__standard__string__BOUND;
+
+TYPE std__standard__string IS RECORD
+ BASE: std__standard__string__BASEP;
+ BOUNDS: std__standard__string__BOUNDP;
+END RECORD;
+
+TYPE std__standard__string__PTR IS ACCESS std__standard__string;
+
+TYPE std__standard__string__SIG IS RECORD
+ BASE: std__standard__string__SIGBASEP;
+ BOUNDS: std__standard__string__BOUNDP;
+END RECORD;
+
+TYPE std__standard__string__SIGPTR IS ACCESS std__standard__string__SIG;
+
+EXTERNAL FUNCTION std__standard__string_EQ (
+ left: std__standard__string__PTR;
+ right: std__standard__string__PTR)
+ RETURN std__standard__boolean;
+
+EXTERNAL FUNCTION std__standard__string_CMP (
+ left: std__standard__string__PTR;
+ right: std__standard__string__PTR)
+ RETURN __ghdl_compare_type;
+
+TYPE std__standard__boolean_vector__BASE IS ARRAY [__ghdl_index_type] OF
+ std__standard__boolean;
+
+TYPE std__standard__boolean_vector__BASEP IS ACCESS
+ std__standard__boolean_vector__BASE;
+
+TYPE std__standard__boolean_vector__SIGBASE IS ARRAY [__ghdl_index_type] OF
+ __ghdl_signal_ptr;
+
+TYPE std__standard__boolean_vector__SIGBASEP IS ACCESS
+ std__standard__boolean_vector__SIGBASE;
+
+TYPE std__standard__boolean_vector__BOUND IS RECORD
+ dim_1: std__standard__integer__BT__TRT;
+END RECORD;
+
+TYPE std__standard__boolean_vector__BOUNDP IS ACCESS
+ std__standard__boolean_vector__BOUND;
+
+TYPE std__standard__boolean_vector IS RECORD
+ BASE: std__standard__boolean_vector__BASEP;
+ BOUNDS: std__standard__boolean_vector__BOUNDP;
+END RECORD;
+
+TYPE std__standard__boolean_vector__PTR IS ACCESS std__standard__boolean_vector
+ ;
+
+TYPE std__standard__boolean_vector__SIG IS RECORD
+ BASE: std__standard__boolean_vector__SIGBASEP;
+ BOUNDS: std__standard__boolean_vector__BOUNDP;
+END RECORD;
+
+TYPE std__standard__boolean_vector__SIGPTR IS ACCESS
+ std__standard__boolean_vector__SIG;
+
+EXTERNAL FUNCTION std__standard__boolean_vector_EQ (
+ left: std__standard__boolean_vector__PTR;
+ right: std__standard__boolean_vector__PTR)
+ RETURN std__standard__boolean;
+
+EXTERNAL FUNCTION std__standard__boolean_vector_CMP (
+ left: std__standard__boolean_vector__PTR;
+ right: std__standard__boolean_vector__PTR)
+ RETURN __ghdl_compare_type;
+
+EXTERNAL PROCEDURE std__standard__boolean_vector_NOT (
+ res: std__standard__boolean_vector__PTR;
+ left: std__standard__boolean_vector__PTR);
+
+EXTERNAL PROCEDURE std__standard__boolean_vector_AND (
+ res: std__standard__boolean_vector__PTR;
+ left: std__standard__boolean_vector__PTR;
+ right: std__standard__boolean_vector__PTR);
+
+EXTERNAL PROCEDURE std__standard__boolean_vector_OR (
+ res: std__standard__boolean_vector__PTR;
+ left: std__standard__boolean_vector__PTR;
+ right: std__standard__boolean_vector__PTR);
+
+EXTERNAL PROCEDURE std__standard__boolean_vector_NAND (
+ res: std__standard__boolean_vector__PTR;
+ left: std__standard__boolean_vector__PTR;
+ right: std__standard__boolean_vector__PTR);
+
+EXTERNAL PROCEDURE std__standard__boolean_vector_NOR (
+ res: std__standard__boolean_vector__PTR;
+ left: std__standard__boolean_vector__PTR;
+ right: std__standard__boolean_vector__PTR);
+
+EXTERNAL PROCEDURE std__standard__boolean_vector_XOR (
+ res: std__standard__boolean_vector__PTR;
+ left: std__standard__boolean_vector__PTR;
+ right: std__standard__boolean_vector__PTR);
+
+EXTERNAL PROCEDURE std__standard__boolean_vector_XNOR (
+ res: std__standard__boolean_vector__PTR;
+ left: std__standard__boolean_vector__PTR;
+ right: std__standard__boolean_vector__PTR);
+
+EXTERNAL PROCEDURE std__standard__boolean_vector_SHL (
+ res: std__standard__boolean_vector__PTR;
+ left: std__standard__boolean_vector__PTR;
+ right: std__standard__integer__BT);
+
+EXTERNAL PROCEDURE std__standard__boolean_vector_SHA (
+ res: std__standard__boolean_vector__PTR;
+ left: std__standard__boolean_vector__PTR;
+ right: std__standard__integer__BT);
+
+EXTERNAL PROCEDURE std__standard__boolean_vector_ROT (
+ res: std__standard__boolean_vector__PTR;
+ left: std__standard__boolean_vector__PTR;
+ right: std__standard__integer__BT);
+
+TYPE std__standard__bit_vector__BASE IS ARRAY [__ghdl_index_type] OF
+ std__standard__bit;
+
+TYPE std__standard__bit_vector__BASEP IS ACCESS std__standard__bit_vector__BASE
+ ;
+
+TYPE std__standard__bit_vector__SIGBASE IS ARRAY [__ghdl_index_type] OF
+ __ghdl_signal_ptr;
+
+TYPE std__standard__bit_vector__SIGBASEP IS ACCESS
+ std__standard__bit_vector__SIGBASE;
+
+TYPE std__standard__bit_vector__BOUND IS RECORD
+ dim_1: std__standard__integer__BT__TRT;
+END RECORD;
+
+TYPE std__standard__bit_vector__BOUNDP IS ACCESS
+ std__standard__bit_vector__BOUND;
+
+TYPE std__standard__bit_vector IS RECORD
+ BASE: std__standard__bit_vector__BASEP;
+ BOUNDS: std__standard__bit_vector__BOUNDP;
+END RECORD;
+
+TYPE std__standard__bit_vector__PTR IS ACCESS std__standard__bit_vector;
+
+TYPE std__standard__bit_vector__SIG IS RECORD
+ BASE: std__standard__bit_vector__SIGBASEP;
+ BOUNDS: std__standard__bit_vector__BOUNDP;
+END RECORD;
+
+TYPE std__standard__bit_vector__SIGPTR IS ACCESS std__standard__bit_vector__SIG
+ ;
+
+EXTERNAL FUNCTION std__standard__bit_vector_EQ (
+ left: std__standard__bit_vector__PTR;
+ right: std__standard__bit_vector__PTR)
+ RETURN std__standard__boolean;
+
+EXTERNAL FUNCTION std__standard__bit_vector_CMP (
+ left: std__standard__bit_vector__PTR;
+ right: std__standard__bit_vector__PTR)
+ RETURN __ghdl_compare_type;
+
+EXTERNAL PROCEDURE std__standard__bit_vector_NOT (
+ res: std__standard__bit_vector__PTR;
+ left: std__standard__bit_vector__PTR);
+
+EXTERNAL PROCEDURE std__standard__bit_vector_AND (
+ res: std__standard__bit_vector__PTR;
+ left: std__standard__bit_vector__PTR;
+ right: std__standard__bit_vector__PTR);
+
+EXTERNAL PROCEDURE std__standard__bit_vector_OR (
+ res: std__standard__bit_vector__PTR;
+ left: std__standard__bit_vector__PTR;
+ right: std__standard__bit_vector__PTR);
+
+EXTERNAL PROCEDURE std__standard__bit_vector_NAND (
+ res: std__standard__bit_vector__PTR;
+ left: std__standard__bit_vector__PTR;
+ right: std__standard__bit_vector__PTR);
+
+EXTERNAL PROCEDURE std__standard__bit_vector_NOR (
+ res: std__standard__bit_vector__PTR;
+ left: std__standard__bit_vector__PTR;
+ right: std__standard__bit_vector__PTR);
+
+EXTERNAL PROCEDURE std__standard__bit_vector_XOR (
+ res: std__standard__bit_vector__PTR;
+ left: std__standard__bit_vector__PTR;
+ right: std__standard__bit_vector__PTR);
+
+EXTERNAL PROCEDURE std__standard__bit_vector_XNOR (
+ res: std__standard__bit_vector__PTR;
+ left: std__standard__bit_vector__PTR;
+ right: std__standard__bit_vector__PTR);
+
+EXTERNAL PROCEDURE std__standard__bit_vector_SHL (
+ res: std__standard__bit_vector__PTR;
+ left: std__standard__bit_vector__PTR;
+ right: std__standard__integer__BT);
+
+EXTERNAL PROCEDURE std__standard__bit_vector_SHA (
+ res: std__standard__bit_vector__PTR;
+ left: std__standard__bit_vector__PTR;
+ right: std__standard__integer__BT);
+
+EXTERNAL PROCEDURE std__standard__bit_vector_ROT (
+ res: std__standard__bit_vector__PTR;
+ left: std__standard__bit_vector__PTR;
+ right: std__standard__integer__BT);
+
+TYPE std__standard__integer_vector__BASE IS ARRAY [__ghdl_index_type] OF
+ std__standard__integer__BT;
+
+TYPE std__standard__integer_vector__BASEP IS ACCESS
+ std__standard__integer_vector__BASE;
+
+TYPE std__standard__integer_vector__SIGBASE IS ARRAY [__ghdl_index_type] OF
+ __ghdl_signal_ptr;
+
+TYPE std__standard__integer_vector__SIGBASEP IS ACCESS
+ std__standard__integer_vector__SIGBASE;
+
+TYPE std__standard__integer_vector__BOUND IS RECORD
+ dim_1: std__standard__integer__BT__TRT;
+END RECORD;
+
+TYPE std__standard__integer_vector__BOUNDP IS ACCESS
+ std__standard__integer_vector__BOUND;
+
+TYPE std__standard__integer_vector IS RECORD
+ BASE: std__standard__integer_vector__BASEP;
+ BOUNDS: std__standard__integer_vector__BOUNDP;
+END RECORD;
+
+TYPE std__standard__integer_vector__PTR IS ACCESS std__standard__integer_vector
+ ;
+
+TYPE std__standard__integer_vector__SIG IS RECORD
+ BASE: std__standard__integer_vector__SIGBASEP;
+ BOUNDS: std__standard__integer_vector__BOUNDP;
+END RECORD;
+
+TYPE std__standard__integer_vector__SIGPTR IS ACCESS
+ std__standard__integer_vector__SIG;
+
+EXTERNAL FUNCTION std__standard__integer_vector_EQ (
+ left: std__standard__integer_vector__PTR;
+ right: std__standard__integer_vector__PTR)
+ RETURN std__standard__boolean;
+
+EXTERNAL FUNCTION std__standard__integer_vector_CMP (
+ left: std__standard__integer_vector__PTR;
+ right: std__standard__integer_vector__PTR)
+ RETURN __ghdl_compare_type;
+
+TYPE std__standard__real_vector__BASE IS ARRAY [__ghdl_index_type] OF
+ std__standard__real__BT;
+
+TYPE std__standard__real_vector__BASEP IS ACCESS
+ std__standard__real_vector__BASE;
+
+TYPE std__standard__real_vector__SIGBASE IS ARRAY [__ghdl_index_type] OF
+ __ghdl_signal_ptr;
+
+TYPE std__standard__real_vector__SIGBASEP IS ACCESS
+ std__standard__real_vector__SIGBASE;
+
+TYPE std__standard__real_vector__BOUND IS RECORD
+ dim_1: std__standard__integer__BT__TRT;
+END RECORD;
+
+TYPE std__standard__real_vector__BOUNDP IS ACCESS
+ std__standard__real_vector__BOUND;
+
+TYPE std__standard__real_vector IS RECORD
+ BASE: std__standard__real_vector__BASEP;
+ BOUNDS: std__standard__real_vector__BOUNDP;
+END RECORD;
+
+TYPE std__standard__real_vector__PTR IS ACCESS std__standard__real_vector;
+
+TYPE std__standard__real_vector__SIG IS RECORD
+ BASE: std__standard__real_vector__SIGBASEP;
+ BOUNDS: std__standard__real_vector__BOUNDP;
+END RECORD;
+
+TYPE std__standard__real_vector__SIGPTR IS ACCESS
+ std__standard__real_vector__SIG;
+
+EXTERNAL FUNCTION std__standard__real_vector_EQ (
+ left: std__standard__real_vector__PTR;
+ right: std__standard__real_vector__PTR)
+ RETURN std__standard__boolean;
+
+TYPE std__standard__time_vector__BASE IS ARRAY [__ghdl_index_type] OF
+ std__standard__time__BT;
+
+TYPE std__standard__time_vector__BASEP IS ACCESS
+ std__standard__time_vector__BASE;
+
+TYPE std__standard__time_vector__SIGBASE IS ARRAY [__ghdl_index_type] OF
+ __ghdl_signal_ptr;
+
+TYPE std__standard__time_vector__SIGBASEP IS ACCESS
+ std__standard__time_vector__SIGBASE;
+
+TYPE std__standard__time_vector__BOUND IS RECORD
+ dim_1: std__standard__integer__BT__TRT;
+END RECORD;
+
+TYPE std__standard__time_vector__BOUNDP IS ACCESS
+ std__standard__time_vector__BOUND;
+
+TYPE std__standard__time_vector IS RECORD
+ BASE: std__standard__time_vector__BASEP;
+ BOUNDS: std__standard__time_vector__BOUNDP;
+END RECORD;
+
+TYPE std__standard__time_vector__PTR IS ACCESS std__standard__time_vector;
+
+TYPE std__standard__time_vector__SIG IS RECORD
+ BASE: std__standard__time_vector__SIGBASEP;
+ BOUNDS: std__standard__time_vector__BOUNDP;
+END RECORD;
+
+TYPE std__standard__time_vector__SIGPTR IS ACCESS
+ std__standard__time_vector__SIG;
+
+EXTERNAL FUNCTION std__standard__time_vector_EQ (
+ left: std__standard__time_vector__PTR;
+ right: std__standard__time_vector__PTR)
+ RETURN std__standard__boolean;
+
+TYPE std__standard__file_open_kind IS ENUM {read_mode, write_mode,
+ append_mode};
+
+TYPE std__standard__file_open_kind__PTR IS ACCESS std__standard__file_open_kind
+ ;
+
+TYPE std__standard__file_open_kind__TRT IS RECORD
+ left: std__standard__file_open_kind;
+ right: std__standard__file_open_kind;
+ dir: __ghdl_dir_type;
+ length: __ghdl_index_type;
+END RECORD;
+
+TYPE std__standard__file_open_kind__TRPTR IS ACCESS
+ std__standard__file_open_kind__TRT;
+
+EXTERNAL CONSTANT std__standard__file_open_kind__BTR :
+ std__standard__file_open_kind__TRT;
+
+TYPE std__standard__file_open_status IS ENUM {open_ok, status_error,
+ name_error, mode_error};
+
+TYPE std__standard__file_open_status__PTR IS ACCESS
+ std__standard__file_open_status;
+
+TYPE std__standard__file_open_status__TRT IS RECORD
+ left: std__standard__file_open_status;
+ right: std__standard__file_open_status;
+ dir: __ghdl_dir_type;
+ length: __ghdl_index_type;
+END RECORD;
+
+TYPE std__standard__file_open_status__TRPTR IS ACCESS
+ std__standard__file_open_status__TRT;
+
+EXTERNAL CONSTANT std__standard__file_open_status__BTR :
+ std__standard__file_open_status__TRT;
+
+TYPE std__standard__CONVERTIBLE_INTEGER__BT IS SIGNED (64);
+
+TYPE std__standard__CONVERTIBLE_INTEGER__BT__PTR IS ACCESS
+ std__standard__CONVERTIBLE_INTEGER__BT;
+
+TYPE std__standard__CONVERTIBLE_INTEGER__BT__TRT IS RECORD
+ left: std__standard__CONVERTIBLE_INTEGER__BT;
+ right: std__standard__CONVERTIBLE_INTEGER__BT;
+ dir: __ghdl_dir_type;
+ length: __ghdl_index_type;
+END RECORD;
+
+TYPE std__standard__CONVERTIBLE_INTEGER__BT__TRPTR IS ACCESS
+ std__standard__CONVERTIBLE_INTEGER__BT__TRT;
+
+TYPE std__standard__CONVERTIBLE_REAL__BT IS FLOAT;
+
+TYPE std__standard__CONVERTIBLE_REAL__BT__PTR IS ACCESS
+ std__standard__CONVERTIBLE_REAL__BT;
+
+TYPE std__standard__CONVERTIBLE_REAL__BT__TRT IS RECORD
+ left: std__standard__CONVERTIBLE_REAL__BT;
+ right: std__standard__CONVERTIBLE_REAL__BT;
+ dir: __ghdl_dir_type;
+END RECORD;
+
+TYPE std__standard__CONVERTIBLE_REAL__BT__TRPTR IS ACCESS
+ std__standard__CONVERTIBLE_REAL__BT__TRT;
+
+EXTERNAL CONSTANT std__standard__RTI : __ghdl_rtin_block;
+
+EXTERNAL CONSTANT std__standard__boolean__RTI : __ghdl_rtin_type_enum;
+
+EXTERNAL CONSTANT std__standard__bit__RTI : __ghdl_rtin_type_enum;
+
+EXTERNAL CONSTANT std__standard__character__RTI : __ghdl_rtin_type_enum;
+
+EXTERNAL CONSTANT std__standard__severity_level__RTI : __ghdl_rtin_type_enum;
+
+EXTERNAL CONSTANT std__standard__UNIVERSAL_INTEGER__BT__RTI :
+ __ghdl_rtin_type_scalar;
+
+EXTERNAL CONSTANT std__standard__UNIVERSAL_INTEGER__RTI :
+ __ghdl_rtin_subtype_scalar;
+
+EXTERNAL CONSTANT std__standard__UNIVERSAL_REAL__BT__RTI :
+ __ghdl_rtin_type_scalar;
+
+EXTERNAL CONSTANT std__standard__UNIVERSAL_REAL__RTI :
+ __ghdl_rtin_subtype_scalar;
+
+EXTERNAL CONSTANT std__standard__integer__BT__RTI : __ghdl_rtin_type_scalar;
+
+EXTERNAL CONSTANT std__standard__integer__RTI : __ghdl_rtin_subtype_scalar;
+
+EXTERNAL CONSTANT std__standard__real__BT__RTI : __ghdl_rtin_type_scalar;
+
+EXTERNAL CONSTANT std__standard__real__RTI : __ghdl_rtin_subtype_scalar;
+
+EXTERNAL CONSTANT std__standard__time__BT__RTI : __ghdl_rtin_type_physical;
+
+EXTERNAL CONSTANT std__standard__time__RTI : __ghdl_rtin_subtype_scalar;
+
+EXTERNAL CONSTANT std__standard__delay_length__RTI : __ghdl_rtin_subtype_scalar
+ ;
+
+EXTERNAL CONSTANT std__standard__natural__RTI : __ghdl_rtin_subtype_scalar;
+
+EXTERNAL CONSTANT std__standard__positive__RTI : __ghdl_rtin_subtype_scalar;
+
+EXTERNAL CONSTANT std__standard__string__RTI : __ghdl_rtin_type_array;
+
+EXTERNAL CONSTANT std__standard__boolean_vector__RTI : __ghdl_rtin_type_array;
+
+EXTERNAL CONSTANT std__standard__bit_vector__RTI : __ghdl_rtin_type_array;
+
+EXTERNAL CONSTANT std__standard__integer_vector__RTI : __ghdl_rtin_type_array;
+
+EXTERNAL CONSTANT std__standard__real_vector__RTI : __ghdl_rtin_type_array;
+
+EXTERNAL CONSTANT std__standard__time_vector__RTI : __ghdl_rtin_type_array;
+
+EXTERNAL CONSTANT std__standard__file_open_kind__RTI : __ghdl_rtin_type_enum;
+
+EXTERNAL CONSTANT std__standard__file_open_status__RTI : __ghdl_rtin_type_enum;
+
+EXTERNAL CONSTANT std__standard__foreign__RTI : __ghdl_rtin_object;
+
+TYPE __ghdl_std_ulogic_boolean_array_type IS SUBARRAY
+ std__standard__BOOLEAN_ARRAY[9];
+
+EXTERNAL CONSTANT __ghdl_std_ulogic_to_boolean_array :
+ __ghdl_std_ulogic_boolean_array_type;
+
+-- internal declarations, part 2
+
+EXTERNAL VAR __ghdl_now : std__standard__time__BT;
+
+EXTERNAL PROCEDURE __ghdl_assert_failed (
+ msg: std__standard__string__PTR;
+ severity: std__standard__severity_level;
+ location: __ghdl_location_ptr);
+
+EXTERNAL PROCEDURE __ghdl_ieee_assert_failed (
+ msg: std__standard__string__PTR;
+ severity: std__standard__severity_level;
+ location: __ghdl_location_ptr);
+
+EXTERNAL PROCEDURE __ghdl_psl_assert_failed (
+ msg: std__standard__string__PTR;
+ severity: std__standard__severity_level;
+ location: __ghdl_location_ptr);
+
+EXTERNAL PROCEDURE __ghdl_psl_cover (
+ msg: std__standard__string__PTR;
+ severity: std__standard__severity_level;
+ location: __ghdl_location_ptr);
+
+EXTERNAL PROCEDURE __ghdl_psl_cover_failed (
+ msg: std__standard__string__PTR;
+ severity: std__standard__severity_level;
+ location: __ghdl_location_ptr);
+
+EXTERNAL PROCEDURE __ghdl_report (
+ msg: std__standard__string__PTR;
+ severity: std__standard__severity_level;
+ location: __ghdl_location_ptr);
+
+EXTERNAL PROCEDURE __ghdl_text_write (
+ file: __ghdl_file_index;
+ str: std__standard__string__PTR);
+
+EXTERNAL FUNCTION __ghdl_text_read_length (
+ file: __ghdl_file_index;
+ str: std__standard__string__PTR)
+ RETURN std__standard__integer__BT;
+
+EXTERNAL PROCEDURE __ghdl_write_scalar (
+ file: __ghdl_file_index;
+ ptr: __ghdl_ptr;
+ length: __ghdl_index_type);
+
+EXTERNAL PROCEDURE __ghdl_read_scalar (
+ file: __ghdl_file_index;
+ ptr: __ghdl_ptr;
+ length: __ghdl_index_type);
+
+EXTERNAL FUNCTION __ghdl_real_exp (
+ left: std__standard__real__BT;
+ right: std__standard__integer__BT)
+ RETURN std__standard__real__BT;
+
+EXTERNAL FUNCTION __ghdl_integer_exp (
+ left: std__standard__integer__BT;
+ right: std__standard__integer__BT)
+ RETURN std__standard__integer__BT;
+
+EXTERNAL PROCEDURE __ghdl_image_b1 (
+ res: std__standard__string__PTR;
+ val: __ghdl_bool_type;
+ RTI: __ghdl_rti_access);
+
+EXTERNAL FUNCTION __ghdl_value_b1 (
+ val: std__standard__string__PTR;
+ rti: __ghdl_rti_access)
+ RETURN __ghdl_bool_type;
+
+EXTERNAL PROCEDURE __ghdl_image_e8 (
+ res: std__standard__string__PTR;
+ val: __ghdl_i32;
+ RTI: __ghdl_rti_access);
+
+EXTERNAL FUNCTION __ghdl_value_e8 (
+ val: std__standard__string__PTR;
+ rti: __ghdl_rti_access)
+ RETURN __ghdl_i32;
+
+EXTERNAL PROCEDURE __ghdl_image_e32 (
+ res: std__standard__string__PTR;
+ val: __ghdl_i32;
+ RTI: __ghdl_rti_access);
+
+EXTERNAL FUNCTION __ghdl_value_e32 (
+ val: std__standard__string__PTR;
+ rti: __ghdl_rti_access)
+ RETURN __ghdl_i32;
+
+EXTERNAL PROCEDURE __ghdl_image_i32 (
+ res: std__standard__string__PTR;
+ val: __ghdl_i32);
+
+EXTERNAL FUNCTION __ghdl_value_i32 (
+ val: std__standard__string__PTR)
+ RETURN __ghdl_i32;
+
+EXTERNAL PROCEDURE __ghdl_image_p32 (
+ res: std__standard__string__PTR;
+ val: __ghdl_i32;
+ RTI: __ghdl_rti_access);
+
+EXTERNAL FUNCTION __ghdl_value_p32 (
+ val: std__standard__string__PTR;
+ rti: __ghdl_rti_access)
+ RETURN __ghdl_i32;
+
+EXTERNAL PROCEDURE __ghdl_image_p64 (
+ res: std__standard__string__PTR;
+ val: __ghdl_i64;
+ RTI: __ghdl_rti_access);
+
+EXTERNAL FUNCTION __ghdl_value_p64 (
+ val: std__standard__string__PTR;
+ rti: __ghdl_rti_access)
+ RETURN __ghdl_i64;
+
+EXTERNAL PROCEDURE __ghdl_image_f64 (
+ res: std__standard__string__PTR;
+ val: __ghdl_real);
+
+EXTERNAL FUNCTION __ghdl_value_f64 (
+ val: std__standard__string__PTR)
+ RETURN __ghdl_real;
+
+EXTERNAL PROCEDURE __ghdl_text_file_open (
+ file: __ghdl_file_index;
+ mode: __ghdl_i32;
+ str: std__standard__string__PTR);
+
+EXTERNAL PROCEDURE __ghdl_file_open (
+ file: __ghdl_file_index;
+ mode: __ghdl_i32;
+ str: std__standard__string__PTR);
+
+EXTERNAL FUNCTION __ghdl_text_file_open_status (
+ file: __ghdl_file_index;
+ mode: __ghdl_i32;
+ str: std__standard__string__PTR)
+ RETURN __ghdl_i32;
+
+EXTERNAL FUNCTION __ghdl_file_open_status (
+ file: __ghdl_file_index;
+ mode: __ghdl_i32;
+ str: std__standard__string__PTR)
+ RETURN __ghdl_i32;
+
+EXTERNAL FUNCTION __ghdl_file_endfile (
+ file: __ghdl_file_index)
+ RETURN std__standard__boolean;
+
+EXTERNAL PROCEDURE __ghdl_text_file_close (
+ file: __ghdl_file_index);
+
+EXTERNAL PROCEDURE __ghdl_file_close (
+ file: __ghdl_file_index);
+
+EXTERNAL PROCEDURE __ghdl_file_flush (
+ file: __ghdl_file_index);
+
+EXTERNAL PROCEDURE __ghdl_signal_create_resolution (
+ func: __ghdl_ptr;
+ INSTANCE: __ghdl_ptr;
+ sig: __ghdl_ptr;
+ nbr_sig: __ghdl_index_type);
+
+TYPE __ghdl_scalar_bytes IS SUBARRAY __ghdl_chararray[8];
+
+TYPE __ghdl_signal IS RECORD
+ driving_value: __ghdl_scalar_bytes;
+ last_value: __ghdl_scalar_bytes;
+ last_event: std__standard__time__BT;
+ last_active: std__standard__time__BT;
+ value: __ghdl_ptr;
+ event: std__standard__boolean;
+ active: std__standard__boolean;
+ has_active: __ghdl_bool_type;
+END RECORD;
+
+TYPE __ghdl_signal_ptr_ptr IS ACCESS __ghdl_signal_ptr;
+
+EXTERNAL PROCEDURE __ghdl_signal_merge_rti (
+ sig: __ghdl_signal_ptr;
+ RTI: __ghdl_rti_access);
+
+EXTERNAL PROCEDURE __ghdl_signal_add_source (
+ targ: __ghdl_signal_ptr;
+ src: __ghdl_signal_ptr);
+
+EXTERNAL PROCEDURE __ghdl_signal_effective_value (
+ targ: __ghdl_signal_ptr;
+ src: __ghdl_signal_ptr);
+
+EXTERNAL PROCEDURE __ghdl_signal_set_disconnect (
+ sig: __ghdl_signal_ptr;
+ time: std__standard__time__BT);
+
+EXTERNAL PROCEDURE __ghdl_signal_disconnect (
+ sig: __ghdl_signal_ptr);
+
+EXTERNAL FUNCTION __ghdl_signal_get_nbr_drivers (
+ sig: __ghdl_signal_ptr)
+ RETURN __ghdl_index_type;
+
+EXTERNAL FUNCTION __ghdl_signal_get_nbr_ports (
+ sig: __ghdl_signal_ptr)
+ RETURN __ghdl_index_type;
+
+EXTERNAL FUNCTION __ghdl_signal_read_driver (
+ sig: __ghdl_signal_ptr;
+ num: __ghdl_index_type)
+ RETURN __ghdl_ptr;
+
+EXTERNAL FUNCTION __ghdl_signal_read_port (
+ sig: __ghdl_signal_ptr;
+ num: __ghdl_index_type)
+ RETURN __ghdl_ptr;
+
+EXTERNAL FUNCTION __ghdl_signal_driving (
+ sig: __ghdl_signal_ptr)
+ RETURN std__standard__boolean;
+
+EXTERNAL PROCEDURE __ghdl_signal_simple_assign_error (
+ sig: __ghdl_signal_ptr;
+ filename: __ghdl_char_ptr;
+ line: __ghdl_i32);
+
+EXTERNAL PROCEDURE __ghdl_signal_start_assign_error (
+ sig: __ghdl_signal_ptr;
+ reject: std__standard__time__BT;
+ after: std__standard__time__BT;
+ filename: __ghdl_char_ptr;
+ line: __ghdl_i32);
+
+EXTERNAL PROCEDURE __ghdl_signal_next_assign_error (
+ sig: __ghdl_signal_ptr;
+ after: std__standard__time__BT;
+ filename: __ghdl_char_ptr;
+ line: __ghdl_i32);
+
+EXTERNAL PROCEDURE __ghdl_signal_start_assign_null (
+ sig: __ghdl_signal_ptr;
+ reject: std__standard__time__BT;
+ after: std__standard__time__BT);
+
+EXTERNAL PROCEDURE __ghdl_signal_next_assign_null (
+ sig: __ghdl_signal_ptr;
+ after: std__standard__time__BT);
+
+EXTERNAL FUNCTION __ghdl_create_signal_e8 (
+ val_ptr: __ghdl_ptr;
+ resolv_func: __ghdl_ptr;
+ resolv_inst: __ghdl_ptr)
+ RETURN __ghdl_signal_ptr;
+
+EXTERNAL PROCEDURE __ghdl_signal_init_e8 (
+ sig: __ghdl_signal_ptr;
+ val: __ghdl_i32);
+
+EXTERNAL PROCEDURE __ghdl_signal_simple_assign_e8 (
+ sig: __ghdl_signal_ptr;
+ val: __ghdl_i32);
+
+EXTERNAL PROCEDURE __ghdl_signal_start_assign_e8 (
+ sig: __ghdl_signal_ptr;
+ reject: std__standard__time__BT;
+ val: __ghdl_i32;
+ after: std__standard__time__BT);
+
+EXTERNAL PROCEDURE __ghdl_signal_next_assign_e8 (
+ sig: __ghdl_signal_ptr;
+ val: __ghdl_i32;
+ after: std__standard__time__BT);
+
+EXTERNAL PROCEDURE __ghdl_signal_associate_e8 (
+ sig: __ghdl_signal_ptr;
+ val: __ghdl_i32);
+
+EXTERNAL FUNCTION __ghdl_signal_driving_value_e8 (
+ sig: __ghdl_signal_ptr)
+ RETURN __ghdl_i32;
+
+EXTERNAL FUNCTION __ghdl_create_signal_e32 (
+ val_ptr: __ghdl_ptr;
+ resolv_func: __ghdl_ptr;
+ resolv_inst: __ghdl_ptr)
+ RETURN __ghdl_signal_ptr;
+
+EXTERNAL PROCEDURE __ghdl_signal_init_e32 (
+ sig: __ghdl_signal_ptr;
+ val: __ghdl_i32);
+
+EXTERNAL PROCEDURE __ghdl_signal_simple_assign_e32 (
+ sig: __ghdl_signal_ptr;
+ val: __ghdl_i32);
+
+EXTERNAL PROCEDURE __ghdl_signal_start_assign_e32 (
+ sig: __ghdl_signal_ptr;
+ reject: std__standard__time__BT;
+ val: __ghdl_i32;
+ after: std__standard__time__BT);
+
+EXTERNAL PROCEDURE __ghdl_signal_next_assign_e32 (
+ sig: __ghdl_signal_ptr;
+ val: __ghdl_i32;
+ after: std__standard__time__BT);
+
+EXTERNAL PROCEDURE __ghdl_signal_associate_e32 (
+ sig: __ghdl_signal_ptr;
+ val: __ghdl_i32);
+
+EXTERNAL FUNCTION __ghdl_signal_driving_value_e32 (
+ sig: __ghdl_signal_ptr)
+ RETURN __ghdl_i32;
+
+EXTERNAL FUNCTION __ghdl_create_signal_b1 (
+ val_ptr: __ghdl_ptr;
+ resolv_func: __ghdl_ptr;
+ resolv_inst: __ghdl_ptr)
+ RETURN __ghdl_signal_ptr;
+
+EXTERNAL PROCEDURE __ghdl_signal_init_b1 (
+ sig: __ghdl_signal_ptr;
+ val: __ghdl_bool_type);
+
+EXTERNAL PROCEDURE __ghdl_signal_simple_assign_b1 (
+ sig: __ghdl_signal_ptr;
+ val: __ghdl_bool_type);
+
+EXTERNAL PROCEDURE __ghdl_signal_start_assign_b1 (
+ sig: __ghdl_signal_ptr;
+ reject: std__standard__time__BT;
+ val: __ghdl_bool_type;
+ after: std__standard__time__BT);
+
+EXTERNAL PROCEDURE __ghdl_signal_next_assign_b1 (
+ sig: __ghdl_signal_ptr;
+ val: __ghdl_bool_type;
+ after: std__standard__time__BT);
+
+EXTERNAL PROCEDURE __ghdl_signal_associate_b1 (
+ sig: __ghdl_signal_ptr;
+ val: __ghdl_bool_type);
+
+EXTERNAL FUNCTION __ghdl_signal_driving_value_b1 (
+ sig: __ghdl_signal_ptr)
+ RETURN __ghdl_bool_type;
+
+EXTERNAL FUNCTION __ghdl_create_signal_i32 (
+ val_ptr: __ghdl_ptr;
+ resolv_func: __ghdl_ptr;
+ resolv_inst: __ghdl_ptr)
+ RETURN __ghdl_signal_ptr;
+
+EXTERNAL PROCEDURE __ghdl_signal_init_i32 (
+ sig: __ghdl_signal_ptr;
+ val: __ghdl_i32);
+
+EXTERNAL PROCEDURE __ghdl_signal_simple_assign_i32 (
+ sig: __ghdl_signal_ptr;
+ val: __ghdl_i32);
+
+EXTERNAL PROCEDURE __ghdl_signal_start_assign_i32 (
+ sig: __ghdl_signal_ptr;
+ reject: std__standard__time__BT;
+ val: __ghdl_i32;
+ after: std__standard__time__BT);
+
+EXTERNAL PROCEDURE __ghdl_signal_next_assign_i32 (
+ sig: __ghdl_signal_ptr;
+ val: __ghdl_i32;
+ after: std__standard__time__BT);
+
+EXTERNAL PROCEDURE __ghdl_signal_associate_i32 (
+ sig: __ghdl_signal_ptr;
+ val: __ghdl_i32);
+
+EXTERNAL FUNCTION __ghdl_signal_driving_value_i32 (
+ sig: __ghdl_signal_ptr)
+ RETURN __ghdl_i32;
+
+EXTERNAL FUNCTION __ghdl_create_signal_f64 (
+ val_ptr: __ghdl_ptr;
+ resolv_func: __ghdl_ptr;
+ resolv_inst: __ghdl_ptr)
+ RETURN __ghdl_signal_ptr;
+
+EXTERNAL PROCEDURE __ghdl_signal_init_f64 (
+ sig: __ghdl_signal_ptr;
+ val: __ghdl_real);
+
+EXTERNAL PROCEDURE __ghdl_signal_simple_assign_f64 (
+ sig: __ghdl_signal_ptr;
+ val: __ghdl_real);
+
+EXTERNAL PROCEDURE __ghdl_signal_start_assign_f64 (
+ sig: __ghdl_signal_ptr;
+ reject: std__standard__time__BT;
+ val: __ghdl_real;
+ after: std__standard__time__BT);
+
+EXTERNAL PROCEDURE __ghdl_signal_next_assign_f64 (
+ sig: __ghdl_signal_ptr;
+ val: __ghdl_real;
+ after: std__standard__time__BT);
+
+EXTERNAL PROCEDURE __ghdl_signal_associate_f64 (
+ sig: __ghdl_signal_ptr;
+ val: __ghdl_real);
+
+EXTERNAL FUNCTION __ghdl_signal_driving_value_f64 (
+ sig: __ghdl_signal_ptr)
+ RETURN __ghdl_real;
+
+EXTERNAL FUNCTION __ghdl_create_signal_i64 (
+ val_ptr: __ghdl_ptr;
+ resolv_func: __ghdl_ptr;
+ resolv_inst: __ghdl_ptr)
+ RETURN __ghdl_signal_ptr;
+
+EXTERNAL PROCEDURE __ghdl_signal_init_i64 (
+ sig: __ghdl_signal_ptr;
+ val: __ghdl_i64);
+
+EXTERNAL PROCEDURE __ghdl_signal_simple_assign_i64 (
+ sig: __ghdl_signal_ptr;
+ val: __ghdl_i64);
+
+EXTERNAL PROCEDURE __ghdl_signal_start_assign_i64 (
+ sig: __ghdl_signal_ptr;
+ reject: std__standard__time__BT;
+ val: __ghdl_i64;
+ after: std__standard__time__BT);
+
+EXTERNAL PROCEDURE __ghdl_signal_next_assign_i64 (
+ sig: __ghdl_signal_ptr;
+ val: __ghdl_i64;
+ after: std__standard__time__BT);
+
+EXTERNAL PROCEDURE __ghdl_signal_associate_i64 (
+ sig: __ghdl_signal_ptr;
+ val: __ghdl_i64);
+
+EXTERNAL FUNCTION __ghdl_signal_driving_value_i64 (
+ sig: __ghdl_signal_ptr)
+ RETURN __ghdl_i64;
+
+EXTERNAL PROCEDURE __ghdl_process_add_sensitivity (
+ sig: __ghdl_signal_ptr);
+
+EXTERNAL PROCEDURE __ghdl_process_add_driver (
+ sig: __ghdl_signal_ptr);
+
+EXTERNAL PROCEDURE __ghdl_signal_add_direct_driver (
+ sig: __ghdl_signal_ptr;
+ drv: __ghdl_ptr);
+
+EXTERNAL PROCEDURE __ghdl_signal_direct_assign (
+ sig: __ghdl_signal_ptr);
+
+EXTERNAL PROCEDURE __ghdl_signal_in_conversion (
+ func: __ghdl_ptr;
+ INSTANCE: __ghdl_ptr;
+ src: __ghdl_signal_ptr;
+ src_len: __ghdl_index_type;
+ dst: __ghdl_signal_ptr;
+ dst_len: __ghdl_index_type);
+
+EXTERNAL PROCEDURE __ghdl_signal_out_conversion (
+ func: __ghdl_ptr;
+ INSTANCE: __ghdl_ptr;
+ src: __ghdl_signal_ptr;
+ src_len: __ghdl_index_type;
+ dst: __ghdl_signal_ptr;
+ dst_len: __ghdl_index_type);
+
+EXTERNAL FUNCTION __ghdl_create_stable_signal (
+ val_ptr: __ghdl_ptr;
+ val: std__standard__time__BT)
+ RETURN __ghdl_signal_ptr;
+
+EXTERNAL FUNCTION __ghdl_create_quiet_signal (
+ val_ptr: __ghdl_ptr;
+ val: std__standard__time__BT)
+ RETURN __ghdl_signal_ptr;
+
+EXTERNAL FUNCTION __ghdl_create_transaction_signal (
+ val_ptr: __ghdl_ptr)
+ RETURN __ghdl_signal_ptr;
+
+EXTERNAL PROCEDURE __ghdl_signal_attribute_register_prefix (
+ sig: __ghdl_signal_ptr);
+
+EXTERNAL FUNCTION __ghdl_create_delayed_signal (
+ sig: __ghdl_signal_ptr;
+ val_ptr: __ghdl_ptr;
+ val: std__standard__time__BT)
+ RETURN __ghdl_signal_ptr;
+
+EXTERNAL FUNCTION __ghdl_signal_create_guard (
+ val_ptr: __ghdl_ptr;
+ this: __ghdl_ptr;
+ proc: __ghdl_ptr)
+ RETURN __ghdl_signal_ptr;
+
+EXTERNAL PROCEDURE __ghdl_signal_guard_dependence (
+ sig: __ghdl_signal_ptr);
+
+EXTERNAL PROCEDURE __ghdl_process_wait_exit (
+ );
+
+EXTERNAL PROCEDURE __ghdl_process_wait_timeout (
+ time: std__standard__time__BT);
+
+EXTERNAL PROCEDURE __ghdl_process_wait_set_timeout (
+ time: std__standard__time__BT);
+
+EXTERNAL PROCEDURE __ghdl_process_wait_add_sensitivity (
+ sig: __ghdl_signal_ptr);
+
+EXTERNAL PROCEDURE __ghdl_process_wait_suspend (
+ );
+
+EXTERNAL FUNCTION __ghdl_process_wait_timed_out (
+ )
+ RETURN __ghdl_bool_type;
+
+EXTERNAL PROCEDURE __ghdl_process_wait_close (
+ );
+
+EXTERNAL PROCEDURE __ghdl_get_path_name (
+ res: std__standard__string__PTR;
+ ctxt: __ghdl_rti_access;
+ addr: __ghdl_ptr;
+ name: __ghdl_str_len_ptr);
+
+EXTERNAL PROCEDURE __ghdl_get_instance_name (
+ res: std__standard__string__PTR;
+ ctxt: __ghdl_rti_access;
+ addr: __ghdl_ptr;
+ name: __ghdl_str_len_ptr);
+
+EXTERNAL PROCEDURE __ghdl_rti_add_package (
+ RTI: __ghdl_rti_access);
+
+EXTERNAL PROCEDURE __ghdl_rti_add_top (
+ max_pkgs: __ghdl_index_type;
+ pkgs: __ghdl_rti_arr_acc;
+ RTI: __ghdl_rti_access;
+ INSTANCE: __ghdl_ptr);
+
+EXTERNAL PROCEDURE __ghdl_init_top_generics (
+ );
+
+EXTERNAL FUNCTION __ghdl_std_ulogic_match_eq (
+ left: __ghdl_i32;
+ right: __ghdl_i32)
+ RETURN __ghdl_i32;
+
+EXTERNAL FUNCTION __ghdl_std_ulogic_match_ne (
+ left: __ghdl_i32;
+ right: __ghdl_i32)
+ RETURN __ghdl_i32;
+
+EXTERNAL FUNCTION __ghdl_std_ulogic_match_lt (
+ left: __ghdl_i32;
+ right: __ghdl_i32)
+ RETURN __ghdl_i32;
+
+EXTERNAL FUNCTION __ghdl_std_ulogic_match_le (
+ left: __ghdl_i32;
+ right: __ghdl_i32)
+ RETURN __ghdl_i32;
+
+EXTERNAL FUNCTION __ghdl_std_ulogic_array_match_eq (
+ left: __ghdl_ptr;
+ l_len: __ghdl_index_type;
+ right: __ghdl_ptr;
+ r_len: __ghdl_index_type)
+ RETURN __ghdl_i32;
+
+EXTERNAL FUNCTION __ghdl_std_ulogic_array_match_ne (
+ left: __ghdl_ptr;
+ l_len: __ghdl_index_type;
+ right: __ghdl_ptr;
+ r_len: __ghdl_index_type)
+ RETURN __ghdl_i32;
+
+EXTERNAL PROCEDURE __ghdl_to_string_i32 (
+ res: std__standard__string__PTR;
+ val: __ghdl_i32);
+
+EXTERNAL PROCEDURE __ghdl_to_string_i64 (
+ res: std__standard__string__PTR;
+ val: __ghdl_i64);
+
+EXTERNAL PROCEDURE __ghdl_to_string_f64 (
+ res: std__standard__string__PTR;
+ val: __ghdl_real);
+
+EXTERNAL PROCEDURE __ghdl_to_string_f64_digits (
+ res: std__standard__string__PTR;
+ val: __ghdl_real;
+ nbr_digits: __ghdl_i32);
+
+EXTERNAL PROCEDURE __ghdl_to_string_f64_format (
+ res: std__standard__string__PTR;
+ val: __ghdl_real;
+ format: std__standard__string__PTR);
+
+EXTERNAL PROCEDURE __ghdl_bv_to_ostring (
+ res: std__standard__string__PTR;
+ val: std__standard__bit_vector__BASEP;
+ length: __ghdl_index_type);
+
+EXTERNAL PROCEDURE __ghdl_bv_to_hstring (
+ res: std__standard__string__PTR;
+ val: std__standard__bit_vector__BASEP;
+ length: __ghdl_index_type);
+
+EXTERNAL PROCEDURE __ghdl_to_string_b1 (
+ res: std__standard__string__PTR;
+ val: __ghdl_bool_type;
+ RTI: __ghdl_rti_access);
+
+EXTERNAL PROCEDURE __ghdl_to_string_e8 (
+ res: std__standard__string__PTR;
+ val: __ghdl_i32;
+ RTI: __ghdl_rti_access);
+
+EXTERNAL PROCEDURE __ghdl_to_string_char (
+ res: std__standard__string__PTR;
+ val: std__standard__character);
+
+EXTERNAL PROCEDURE __ghdl_to_string_e32 (
+ res: std__standard__string__PTR;
+ val: __ghdl_i32;
+ RTI: __ghdl_rti_access);
+
+EXTERNAL PROCEDURE __ghdl_to_string_p32 (
+ res: std__standard__string__PTR;
+ val: __ghdl_i32;
+ RTI: __ghdl_rti_access);
+
+EXTERNAL PROCEDURE __ghdl_to_string_p64 (
+ res: std__standard__string__PTR;
+ val: __ghdl_i64;
+ RTI: __ghdl_rti_access);
+
+EXTERNAL PROCEDURE __ghdl_time_to_string_unit (
+ res: std__standard__string__PTR;
+ val: std__standard__time__BT;
+ unit: std__standard__time__BT;
+ RTI: __ghdl_rti_access);
+
+EXTERNAL PROCEDURE __ghdl_array_char_to_string_b1 (
+ res: std__standard__string__PTR;
+ val: __ghdl_ptr;
+ length: __ghdl_index_type;
+ RTI: __ghdl_rti_access);
+
+EXTERNAL PROCEDURE __ghdl_array_char_to_string_e8 (
+ res: std__standard__string__PTR;
+ val: __ghdl_ptr;
+ length: __ghdl_index_type;
+ RTI: __ghdl_rti_access);
+
+EXTERNAL PROCEDURE __ghdl_array_char_to_string_e32 (
+ res: std__standard__string__PTR;
+ val: __ghdl_ptr;
+ length: __ghdl_index_type;
+ RTI: __ghdl_rti_access);
+
+PRIVATE CONSTANT _UI00000000 : SUBARRAY __ghdl_chararray[9];
+
+CONSTANT _UI00000000 := {116, 98, 51, 46, 118, 104, 100, 108, 0};
+
+--F /Users/gingold/devel/ghdl/testsuite/gna/bug053/tb3.vhdl
+
+-- package declaration pkg2
+
+PUBLIC CONSTANT work__pkg2__pkg1__c : std__standard__integer__BT;
+
+CONSTANT work__pkg2__pkg1__c := 5;
+
+PUBLIC FUNCTION work__pkg2__pkg1__f (
+ )
+ RETURN std__standard__integer__BT;
+
+PUBLIC VAR work__pkg2__ELABORATED : __ghdl_bool_type;
+
+PUBLIC PROCEDURE work__pkg2__ELAB_BODY (
+ );
+
+PUBLIC PROCEDURE work__pkg2__ELAB_SPEC (
+ );
+
+EXTERNAL CONSTANT work__RTI : __ghdl_rtin_type_scalar;
+
+PUBLIC CONSTANT work__pkg2__RTI : __ghdl_rtin_block_file;
+
+PUBLIC CONSTANT work__pkg2__pkg1__RTI : __ghdl_rtin_block;
+
+PUBLIC CONSTANT work__pkg2__pkg1__c__RTI : __ghdl_rtin_object;
+
+PRIVATE CONSTANT work__pkg2__pkg1__c__RTISTR : SUBARRAY __ghdl_chararray[2];
+
+CONSTANT work__pkg2__pkg1__c__RTISTR := {99, 0};
+
+CONSTANT work__pkg2__pkg1__c__RTI := {{__ghdl_rtik'[__ghdl_rtik_constant], 0,
+ 0, 0}, __ghdl_char_ptr'unchecked_address (work__pkg2__pkg1__c__RTISTR),
+ __ghdl_ptr'unchecked_address (work__pkg2__pkg1__c),
+ __ghdl_rti_access'unchecked_address (std__standard__natural__RTI), 782};
+
+PRIVATE CONSTANT work__pkg2__pkg1__RTISTR : SUBARRAY __ghdl_chararray[5];
+
+CONSTANT work__pkg2__pkg1__RTISTR := {112, 107, 103, 49, 0};
+
+PRIVATE CONSTANT work__pkg2__pkg1__RTIARRAY : SUBARRAY __ghdl_rti_array[2];
+
+CONSTANT work__pkg2__pkg1__RTIARRAY :=
+ {__ghdl_rti_access'unchecked_address (work__pkg2__pkg1__c__RTI),
+ __ghdl_rti_access'[NULL]};
+
+CONSTANT work__pkg2__pkg1__RTI := {{__ghdl_rtik'[__ghdl_rtik_package], 2, 0,
+ 0}, __ghdl_char_ptr'address (work__pkg2__pkg1__RTISTR), __ghdl_ptr'[NULL],
+ 523, __ghdl_rti_access'unchecked_address (work__pkg2__RTI), 1,
+ __ghdl_rti_arr_acc'address (work__pkg2__pkg1__RTIARRAY)};
+
+PRIVATE CONSTANT work__pkg2__RTISTR : SUBARRAY __ghdl_chararray[5];
+
+CONSTANT work__pkg2__RTISTR := {112, 107, 103, 50, 0};
+
+PRIVATE CONSTANT work__pkg2__RTIARRAY : SUBARRAY __ghdl_rti_array[1];
+
+CONSTANT work__pkg2__RTIARRAY := {__ghdl_rti_access'[NULL]};
+
+CONSTANT work__pkg2__RTI := {{{__ghdl_rtik'[__ghdl_rtik_package], 1, 0, 0},
+ __ghdl_char_ptr'address (work__pkg2__RTISTR), __ghdl_ptr'[NULL], 265,
+ __ghdl_rti_access'unchecked_address (work__RTI), 0,
+ __ghdl_rti_arr_acc'address (work__pkg2__RTIARRAY)},
+ __ghdl_char_ptr'address (_UI00000000)};
+
+PUBLIC PROCEDURE work__pkg2__ELAB_SPEC (
+ )
+DECLARE
+BEGIN
+ __ghdl_rti_add_package (__ghdl_rti_access'unchecked_address (work__pkg2__RTI)
+ );
+END;
+
+--F /Users/gingold/devel/ghdl/testsuite/gna/bug053/tb3.vhdl
+
+-- package body pkg2
+
+PRIVATE CONSTANT work__pkg2__BODY__RTI : __ghdl_rtin_block;
+
+PRIVATE CONSTANT work__pkg2__BODY__RTISTR : SUBARRAY __ghdl_chararray[5];
+
+CONSTANT work__pkg2__BODY__RTISTR := {112, 107, 103, 49, 0};
+
+PRIVATE CONSTANT work__pkg2__BODY__RTIARRAY : SUBARRAY __ghdl_rti_array[1];
+
+CONSTANT work__pkg2__BODY__RTIARRAY := {__ghdl_rti_access'[NULL]};
+
+CONSTANT work__pkg2__BODY__RTI := {{__ghdl_rtik'[__ghdl_rtik_package_body], 1,
+ 0, 0}, __ghdl_char_ptr'address (work__pkg2__BODY__RTISTR),
+ __ghdl_ptr'[NULL], 2320,
+ __ghdl_rti_access'unchecked_address (work__pkg2__pkg1__RTI), 0,
+ __ghdl_rti_arr_acc'address (work__pkg2__BODY__RTIARRAY)};
+
+PUBLIC FUNCTION work__pkg2__pkg1__f (
+ )
+ RETURN std__standard__integer__BT
+DECLARE
+BEGIN
+ --# 12
+ DECLARE
+ LOCAL VAR T1_0 : std__standard__integer__BT;
+ BEGIN
+ T1_0 := 3;
+ RETURN T1_0;
+ END;
+END;
+
+PRIVATE CONSTANT work__pkg2__BODY__RTI : __ghdl_rtin_block_file;
+
+PRIVATE CONSTANT work__pkg2__BODY__pkg1__BODY__RTI : __ghdl_rtin_block;
+
+PRIVATE CONSTANT work__pkg2__BODY__pkg1__BODY__RTISTR : SUBARRAY
+ __ghdl_chararray[5];
+
+CONSTANT work__pkg2__BODY__pkg1__BODY__RTISTR := {112, 107, 103, 49, 0};
+
+PRIVATE CONSTANT work__pkg2__BODY__pkg1__BODY__RTIARRAY : SUBARRAY
+ __ghdl_rti_array[1];
+
+CONSTANT work__pkg2__BODY__pkg1__BODY__RTIARRAY := {__ghdl_rti_access'[NULL]};
+
+CONSTANT work__pkg2__BODY__pkg1__BODY__RTI := {
+ {__ghdl_rtik'[__ghdl_rtik_package_body], 2, 0, 0},
+ __ghdl_char_ptr'address (work__pkg2__BODY__pkg1__BODY__RTISTR),
+ __ghdl_ptr'[NULL], 2320,
+ __ghdl_rti_access'unchecked_address (work__pkg2__BODY__RTI), 0,
+ __ghdl_rti_arr_acc'address (work__pkg2__BODY__pkg1__BODY__RTIARRAY)};
+
+PRIVATE CONSTANT work__pkg2__BODY__RTISTR : SUBARRAY __ghdl_chararray[5];
+
+CONSTANT work__pkg2__BODY__RTISTR := {112, 107, 103, 50, 0};
+
+PRIVATE CONSTANT work__pkg2__BODY__RTIARRAY : SUBARRAY __ghdl_rti_array[1];
+
+CONSTANT work__pkg2__BODY__RTIARRAY := {__ghdl_rti_access'[NULL]};
+
+CONSTANT work__pkg2__BODY__RTI := {{{__ghdl_rtik'[__ghdl_rtik_package_body],
+ 1, 0, 0}, __ghdl_char_ptr'address (work__pkg2__BODY__RTISTR),
+ __ghdl_ptr'[NULL], 2062,
+ __ghdl_rti_access'unchecked_address (work__pkg2__RTI), 0,
+ __ghdl_rti_arr_acc'address (work__pkg2__BODY__RTIARRAY)},
+ __ghdl_char_ptr'address (_UI00000000)};
+
+PUBLIC PROCEDURE work__pkg2__ELAB_BODY (
+ )
+DECLARE
+BEGIN
+ IF work__pkg2__ELABORATED THEN
+ RETURN ;
+ ELSE
+ work__pkg2__ELABORATED := __ghdl_bool_type'[true];
+ END IF;
+ work__pkg2__ELAB_SPEC ();
+ IF NOT work__pkg2__ELABORATED THEN
+ work__pkg2__ELAB_BODY ();
+ END IF;
+END;
+
+--F /Users/gingold/devel/ghdl/testsuite/gna/bug053/tb3.vhdl
+
+-- entity tb3
+
+TYPE work__tb3__INSTTYPE IS RECORD;
+
+TYPE work__tb3__INSTPTR IS ACCESS work__tb3__INSTTYPE;
+
+TYPE work__tb3__INSTTYPE IS RECORD
+ RTI: __ghdl_entity_link_type;
+END RECORD;
+
+PUBLIC PROCEDURE work__tb3__DECL_ELAB (
+ INSTANCE: work__tb3__INSTPTR);
+
+PUBLIC PROCEDURE work__tb3__STMT_ELAB (
+ INSTANCE: work__tb3__INSTPTR);
+
+PUBLIC PROCEDURE work__tb3__PKG_ELAB (
+ );
+
+PUBLIC CONSTANT work__tb3__RTI : __ghdl_rtin_block_file;
+
+PRIVATE CONSTANT work__tb3__RTISTR : SUBARRAY __ghdl_chararray[4];
+
+CONSTANT work__tb3__RTISTR := {116, 98, 51, 0};
+
+PRIVATE CONSTANT work__tb3__RTIARRAY : SUBARRAY __ghdl_rti_array[1];
+
+CONSTANT work__tb3__RTIARRAY := {__ghdl_rti_access'[NULL]};
+
+CONSTANT work__tb3__RTI := {{{__ghdl_rtik'[__ghdl_rtik_entity], 1, 0, 0},
+ __ghdl_char_ptr'address (work__tb3__RTISTR), __ghdl_ptr'[NULL], 4360,
+ __ghdl_rti_access'unchecked_address (work__RTI), 0,
+ __ghdl_rti_arr_acc'address (work__tb3__RTIARRAY)},
+ __ghdl_char_ptr'address (_UI00000000)};
+
+PUBLIC PROCEDURE work__tb3__PKG_ELAB (
+ )
+DECLARE
+BEGIN
+ --# 17
+END;
+
+PUBLIC PROCEDURE work__tb3__DECL_ELAB (
+ INSTANCE: work__tb3__INSTPTR)
+DECLARE
+BEGIN
+ --# 17
+ --# 17
+END;
+
+PUBLIC PROCEDURE work__tb3__STMT_ELAB (
+ INSTANCE: work__tb3__INSTPTR)
+DECLARE
+BEGIN
+ --# 17
+END;
+
+--F /Users/gingold/devel/ghdl/testsuite/gna/bug053/tb3.vhdl
+
+-- architecture behav
+
+TYPE work__tb3__ARCH__behav__INSTTYPE IS RECORD;
+
+TYPE work__tb3__ARCH__behav__INSTPTR IS ACCESS work__tb3__ARCH__behav__INSTTYPE
+ ;
+
+TYPE work__tb3__ARCH__behav__P0__INSTTYPE IS RECORD
+END RECORD;
+
+TYPE work__tb3__ARCH__behav__P1__INSTTYPE IS RECORD
+END RECORD;
+
+TYPE work__tb3__ARCH__behav__P2__INSTTYPE IS RECORD
+END RECORD;
+
+TYPE work__tb3__ARCH__behav__P3__INSTTYPE IS RECORD
+END RECORD;
+
+TYPE work__tb3__ARCH__behav__INSTTYPE IS RECORD
+ ENTITY: work__tb3__INSTTYPE;
+ P0: work__tb3__ARCH__behav__P0__INSTTYPE;
+ P1: work__tb3__ARCH__behav__P1__INSTTYPE;
+ P2: work__tb3__ARCH__behav__P2__INSTTYPE;
+ P3: work__tb3__ARCH__behav__P3__INSTTYPE;
+END RECORD;
+
+PUBLIC CONSTANT work__tb3__ARCH__behav__INSTSIZE : __ghdl_index_type;
+
+CONSTANT work__tb3__ARCH__behav__INSTSIZE := __ghdl_index_type'sizeof (
+ work__tb3__ARCH__behav__INSTTYPE);
+
+PUBLIC PROCEDURE work__tb3__ARCH__behav__DECL_ELAB (
+ INSTANCE: work__tb3__INSTPTR);
+
+PUBLIC PROCEDURE work__tb3__ARCH__behav__STMT_ELAB (
+ INSTANCE: work__tb3__INSTPTR);
+
+PUBLIC CONSTANT work__tb3__ARCH__behav__RTI : __ghdl_rtin_block_file;
+
+PUBLIC CONSTANT work__tb3__ARCH__behav__P0__RTI : __ghdl_rtin_block;
+
+PRIVATE CONSTANT work__tb3__ARCH__behav__P0__RTISTR : SUBARRAY __ghdl_chararray
+ [3];
+
+CONSTANT work__tb3__ARCH__behav__P0__RTISTR := {80, 48, 0};
+
+PRIVATE CONSTANT work__tb3__ARCH__behav__P0__RTIARRAY : SUBARRAY
+ __ghdl_rti_array[1];
+
+CONSTANT work__tb3__ARCH__behav__P0__RTIARRAY := {__ghdl_rti_access'[NULL]};
+
+CONSTANT work__tb3__ARCH__behav__P0__RTI := {
+ {__ghdl_rtik'[__ghdl_rtik_process], 2, 0, 0},
+ __ghdl_char_ptr'address (work__tb3__ARCH__behav__P0__RTISTR),
+ __ghdl_ptr'offsetof (work__tb3__ARCH__behav__INSTTYPE.P0), 6147,
+ __ghdl_rti_access'unchecked_address (work__tb3__ARCH__behav__RTI), 0,
+ __ghdl_rti_arr_acc'address (work__tb3__ARCH__behav__P0__RTIARRAY)};
+
+PUBLIC CONSTANT work__tb3__ARCH__behav__P1__RTI : __ghdl_rtin_block;
+
+PRIVATE CONSTANT work__tb3__ARCH__behav__P1__RTISTR : SUBARRAY __ghdl_chararray
+ [3];
+
+CONSTANT work__tb3__ARCH__behav__P1__RTISTR := {80, 49, 0};
+
+PRIVATE CONSTANT work__tb3__ARCH__behav__P1__RTIARRAY : SUBARRAY
+ __ghdl_rti_array[1];
+
+CONSTANT work__tb3__ARCH__behav__P1__RTIARRAY := {__ghdl_rti_access'[NULL]};
+
+CONSTANT work__tb3__ARCH__behav__P1__RTI := {
+ {__ghdl_rtik'[__ghdl_rtik_process], 2, 0, 0},
+ __ghdl_char_ptr'address (work__tb3__ARCH__behav__P1__RTISTR),
+ __ghdl_ptr'offsetof (work__tb3__ARCH__behav__INSTTYPE.P1), 6403,
+ __ghdl_rti_access'unchecked_address (work__tb3__ARCH__behav__RTI), 0,
+ __ghdl_rti_arr_acc'address (work__tb3__ARCH__behav__P1__RTIARRAY)};
+
+PUBLIC CONSTANT work__tb3__ARCH__behav__P2__RTI : __ghdl_rtin_block;
+
+PRIVATE CONSTANT work__tb3__ARCH__behav__P2__RTISTR : SUBARRAY __ghdl_chararray
+ [3];
+
+CONSTANT work__tb3__ARCH__behav__P2__RTISTR := {80, 50, 0};
+
+PRIVATE CONSTANT work__tb3__ARCH__behav__P2__RTIARRAY : SUBARRAY
+ __ghdl_rti_array[1];
+
+CONSTANT work__tb3__ARCH__behav__P2__RTIARRAY := {__ghdl_rti_access'[NULL]};
+
+CONSTANT work__tb3__ARCH__behav__P2__RTI := {
+ {__ghdl_rtik'[__ghdl_rtik_process], 2, 0, 0},
+ __ghdl_char_ptr'address (work__tb3__ARCH__behav__P2__RTISTR),
+ __ghdl_ptr'offsetof (work__tb3__ARCH__behav__INSTTYPE.P2), 6659,
+ __ghdl_rti_access'unchecked_address (work__tb3__ARCH__behav__RTI), 0,
+ __ghdl_rti_arr_acc'address (work__tb3__ARCH__behav__P2__RTIARRAY)};
+
+PUBLIC CONSTANT work__tb3__ARCH__behav__P3__RTI : __ghdl_rtin_block;
+
+PRIVATE CONSTANT work__tb3__ARCH__behav__P3__RTISTR : SUBARRAY __ghdl_chararray
+ [3];
+
+CONSTANT work__tb3__ARCH__behav__P3__RTISTR := {80, 51, 0};
+
+PRIVATE CONSTANT work__tb3__ARCH__behav__P3__RTIARRAY : SUBARRAY
+ __ghdl_rti_array[1];
+
+CONSTANT work__tb3__ARCH__behav__P3__RTIARRAY := {__ghdl_rti_access'[NULL]};
+
+CONSTANT work__tb3__ARCH__behav__P3__RTI := {
+ {__ghdl_rtik'[__ghdl_rtik_process], 2, 0, 0},
+ __ghdl_char_ptr'address (work__tb3__ARCH__behav__P3__RTISTR),
+ __ghdl_ptr'offsetof (work__tb3__ARCH__behav__INSTTYPE.P3), 6915,
+ __ghdl_rti_access'unchecked_address (work__tb3__ARCH__behav__RTI), 0,
+ __ghdl_rti_arr_acc'address (work__tb3__ARCH__behav__P3__RTIARRAY)};
+
+PRIVATE CONSTANT work__tb3__ARCH__behav__RTISTR : SUBARRAY __ghdl_chararray[6];
+
+CONSTANT work__tb3__ARCH__behav__RTISTR := {98, 101, 104, 97, 118, 0};
+
+PRIVATE CONSTANT work__tb3__ARCH__behav__RTIARRAY : SUBARRAY __ghdl_rti_array[5
+ ];
+
+CONSTANT work__tb3__ARCH__behav__RTIARRAY :=
+ {__ghdl_rti_access'unchecked_address (work__tb3__ARCH__behav__P0__RTI),
+ __ghdl_rti_access'unchecked_address (work__tb3__ARCH__behav__P1__RTI),
+ __ghdl_rti_access'unchecked_address (work__tb3__ARCH__behav__P2__RTI),
+ __ghdl_rti_access'unchecked_address (work__tb3__ARCH__behav__P3__RTI),
+ __ghdl_rti_access'[NULL]};
+
+CONSTANT work__tb3__ARCH__behav__RTI := {{
+ {__ghdl_rtik'[__ghdl_rtik_architecture], 1, 0, 0},
+ __ghdl_char_ptr'address (work__tb3__ARCH__behav__RTISTR),
+ __ghdl_ptr'offsetof (work__tb3__ARCH__behav__INSTTYPE.ENTITY), 5646,
+ __ghdl_rti_access'unchecked_address (work__tb3__RTI), 4,
+ __ghdl_rti_arr_acc'address (work__tb3__ARCH__behav__RTIARRAY)},
+ __ghdl_char_ptr'address (_UI00000000)};
+
+
+PRIVATE PROCEDURE work__tb3__ARCH__behav__P0__PROC (
+ INSTANCE: work__tb3__ARCH__behav__INSTPTR)
+DECLARE
+BEGIN
+ --# 24
+END;
+
+
+PRIVATE PROCEDURE work__tb3__ARCH__behav__P1__PROC (
+ INSTANCE: work__tb3__ARCH__behav__INSTPTR)
+DECLARE
+ PRIVATE CONSTANT _UI00000001 : __ghdl_location;
+ CONSTANT _UI00000001 := {__ghdl_char_ptr'address (_UI00000000), 25, 3};
+ TYPE work__tb3__ARCH__behav__P1__U0 IS SUBARRAY std__standard__string__BASE[
+ 16];
+ PRIVATE CONSTANT work__tb3__ARCH__behav__P1__U0__STB :
+ std__standard__string__BOUND;
+ CONSTANT work__tb3__ARCH__behav__P1__U0__STB := {{1, 16,
+ __ghdl_dir_type'[dir_to], 16}};
+ PRIVATE CONSTANT _UI00000002 : work__tb3__ARCH__behav__P1__U0;
+ CONSTANT _UI00000002 := {std__standard__character'[C_v],
+ std__standard__character'[C_a], std__standard__character'[C_l],
+ std__standard__character'[C_u], std__standard__character'[C_e],
+ std__standard__character'[C20], std__standard__character'[C_i],
+ std__standard__character'[C_s], std__standard__character'[C20],
+ std__standard__character'[C_c], std__standard__character'[C_o],
+ std__standard__character'[C_r], std__standard__character'[C_r],
+ std__standard__character'[C_e], std__standard__character'[C_c],
+ std__standard__character'[C_t]};
+ PRIVATE CONSTANT _UI00000003 : std__standard__string;
+ CONSTANT _UI00000003 := {std__standard__string__BASEP'address (_UI00000002),
+ std__standard__string__BOUNDP'address (work__tb3__ARCH__behav__P1__U0__STB
+ )};
+BEGIN
+ --# 25
+ __ghdl_assert_failed (std__standard__string__PTR'address (_UI00000003),
+ std__standard__severity_level'[note], __ghdl_location_ptr'address (
+ _UI00000001));
+END;
+
+
+PRIVATE PROCEDURE work__tb3__ARCH__behav__P2__PROC (
+ INSTANCE: work__tb3__ARCH__behav__INSTPTR)
+DECLARE
+ PRIVATE CONSTANT _UI00000004 : __ghdl_location;
+ CONSTANT _UI00000004 := {__ghdl_char_ptr'address (_UI00000000), 26, 3};
+BEGIN
+ --# 26
+ IF NOT std__standard__boolean'(work__pkg2__pkg1__f () = 3) THEN
+ __ghdl_assert_failed (std__standard__string__PTR'[NULL],
+ std__standard__severity_level'[failure], __ghdl_location_ptr'address (
+ _UI00000004));
+ END IF;
+END;
+
+
+PRIVATE PROCEDURE work__tb3__ARCH__behav__P3__PROC (
+ INSTANCE: work__tb3__ARCH__behav__INSTPTR)
+DECLARE
+ PRIVATE CONSTANT _UI00000005 : __ghdl_location;
+ CONSTANT _UI00000005 := {__ghdl_char_ptr'address (_UI00000000), 27, 3};
+ TYPE work__tb3__ARCH__behav__P3__U0 IS SUBARRAY std__standard__string__BASE[
+ 16];
+ PRIVATE CONSTANT work__tb3__ARCH__behav__P3__U0__STB :
+ std__standard__string__BOUND;
+ CONSTANT work__tb3__ARCH__behav__P3__U0__STB := {{1, 16,
+ __ghdl_dir_type'[dir_to], 16}};
+ PRIVATE CONSTANT _UI00000006 : work__tb3__ARCH__behav__P3__U0;
+ CONSTANT _UI00000006 := {std__standard__character'[C_v],
+ std__standard__character'[C_a], std__standard__character'[C_l],
+ std__standard__character'[C_u], std__standard__character'[C_e],
+ std__standard__character'[C20], std__standard__character'[C_i],
+ std__standard__character'[C_s], std__standard__character'[C20],
+ std__standard__character'[C_c], std__standard__character'[C_o],
+ std__standard__character'[C_r], std__standard__character'[C_r],
+ std__standard__character'[C_e], std__standard__character'[C_c],
+ std__standard__character'[C_t]};
+ PRIVATE CONSTANT _UI00000007 : std__standard__string;
+ CONSTANT _UI00000007 := {std__standard__string__BASEP'address (_UI00000006),
+ std__standard__string__BOUNDP'address (work__tb3__ARCH__behav__P3__U0__STB
+ )};
+BEGIN
+ --# 27
+ IF NOT std__standard__boolean'(work__pkg2__pkg1__f () /= 3) THEN
+ __ghdl_assert_failed (std__standard__string__PTR'address (_UI00000007),
+ std__standard__severity_level'[note], __ghdl_location_ptr'address (
+ _UI00000005));
+ END IF;
+END;
+
+PUBLIC PROCEDURE work__tb3__ARCH__behav__DECL_ELAB (
+ INSTANCE: work__tb3__INSTPTR)
+DECLARE
+ LOCAL VAR ARCH_INSTANCE : work__tb3__ARCH__behav__INSTPTR;
+BEGIN
+ ARCH_INSTANCE := work__tb3__ARCH__behav__INSTPTR'conv (INSTANCE);
+ INSTANCE.ALL.RTI.rti := __ghdl_rti_access'unchecked_address (
+ work__tb3__ARCH__behav__RTI);
+ work__tb3__DECL_ELAB (INSTANCE);
+ --# 22
+ IF NOT work__pkg2__ELABORATED THEN
+ work__pkg2__ELAB_BODY ();
+ END IF;
+ --# 22
+END;
+
+PUBLIC PROCEDURE work__tb3__ARCH__behav__STMT_ELAB (
+ INSTANCE: work__tb3__INSTPTR)
+DECLARE
+ LOCAL VAR ARCH_INSTANCE : work__tb3__ARCH__behav__INSTPTR;
+BEGIN
+ ARCH_INSTANCE := work__tb3__ARCH__behav__INSTPTR'conv (INSTANCE);
+ work__tb3__STMT_ELAB (INSTANCE);
+ --# 22
+ --# 24
+ __ghdl_sensitized_process_register (__ghdl_ptr'unchecked_address (
+ ARCH_INSTANCE.ALL), __ghdl_ptr'subprg_addr (
+ work__tb3__ARCH__behav__P0__PROC), __ghdl_rti_access'unchecked_address (
+ work__tb3__ARCH__behav__P0__RTI), __ghdl_ptr'unchecked_address (
+ ARCH_INSTANCE.ALL.P0));
+ --# 25
+ __ghdl_sensitized_process_register (__ghdl_ptr'unchecked_address (
+ ARCH_INSTANCE.ALL), __ghdl_ptr'subprg_addr (
+ work__tb3__ARCH__behav__P1__PROC), __ghdl_rti_access'unchecked_address (
+ work__tb3__ARCH__behav__P1__RTI), __ghdl_ptr'unchecked_address (
+ ARCH_INSTANCE.ALL.P1));
+ --# 26
+ __ghdl_sensitized_process_register (__ghdl_ptr'unchecked_address (
+ ARCH_INSTANCE.ALL), __ghdl_ptr'subprg_addr (
+ work__tb3__ARCH__behav__P2__PROC), __ghdl_rti_access'unchecked_address (
+ work__tb3__ARCH__behav__P2__RTI), __ghdl_ptr'unchecked_address (
+ ARCH_INSTANCE.ALL.P2));
+ --# 27
+ __ghdl_sensitized_process_register (__ghdl_ptr'unchecked_address (
+ ARCH_INSTANCE.ALL), __ghdl_ptr'subprg_addr (
+ work__tb3__ARCH__behav__P3__PROC), __ghdl_rti_access'unchecked_address (
+ work__tb3__ARCH__behav__P3__RTI), __ghdl_ptr'unchecked_address (
+ ARCH_INSTANCE.ALL.P3));
+END;
+
diff --git a/testsuite/gna/bug053/tb3.vhdl b/testsuite/gna/bug053/tb3.vhdl
new file mode 100644
index 000000000..6e40456d9
--- /dev/null
+++ b/testsuite/gna/bug053/tb3.vhdl
@@ -0,0 +1,28 @@
+package pkg2 is
+ package pkg1 is
+ constant c : natural := 5;
+ function f return natural;
+ end pkg1;
+end pkg2;
+
+package body pkg2 is
+ package body pkg1 is
+ function f return natural is
+ begin
+ return 3;
+ end f;
+ end pkg1;
+end pkg2;
+
+entity tb3 is
+end tb3;
+
+use work.pkg2.all;
+
+architecture behav of tb3 is
+begin
+ assert pkg1.c = 5 severity failure;
+ assert pkg1.c /= 5 report "value is correct" severity note;
+ assert pkg1.f = 3 severity failure;
+ assert pkg1.f /= 3 report "value is correct" severity note;
+end behav;
diff --git a/testsuite/gna/bug053/testsuite.sh b/testsuite/gna/bug053/testsuite.sh
new file mode 100755
index 000000000..ca9ac22c5
--- /dev/null
+++ b/testsuite/gna/bug053/testsuite.sh
@@ -0,0 +1,17 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+GHDL_STD_FLAGS=--std=08
+
+analyze_failure tb1.vhdl
+
+analyze tb2.vhdl
+elab_simulate tb2
+
+analyze tb3.vhdl
+elab_simulate tb3
+
+clean
+
+echo "Test successful"