diff options
Diffstat (limited to 'src/ortho/oread/tests/structref3.on')
-rw-r--r-- | src/ortho/oread/tests/structref3.on | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/ortho/oread/tests/structref3.on b/src/ortho/oread/tests/structref3.on new file mode 100644 index 000000000..0832a5e30 --- /dev/null +++ b/src/ortho/oread/tests/structref3.on @@ -0,0 +1,24 @@ +TYPE __ghdl_index_type IS UNSIGNED (32); + +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_str_len IS RECORD + str: __ghdl_char_ptr; + len: __ghdl_index_type; +END RECORD; + +TYPE ghdl_str_len_acc IS ACCESS __ghdl_str_len; + +PUBLIC VAR var1 : __ghdl_str_len; + +PUBLIC FUNCTION get_len (arg : ghdl_str_len_acc) RETURN __ghdl_index_type +DECLARE +BEGIN + RETURN arg.ALL.len; +END; |