aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/issue807/test.vhdl
blob: 6061d1c8e9ba164bfac6d8c2eed5e414943c27ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
library ieee;
use ieee.std_logic_1164.all;

package test_pkg is

  type record_t is record
    data : std_ulogic_vector;
  end record;

  procedure test_procedure(
    variable rec : out record_t);

  function test_function
    return record_t;

  function get_data
    return std_ulogic_vector;

end package;

package body test_pkg is

  procedure test_procedure(
    variable rec : out record_t)
  is
  begin
    rec := test_function;
  end procedure;

  function test_function
    return record_t
  is
  begin
    return (data => get_data);
  end function;

  function get_data
    return std_ulogic_vector
  is
  begin
    return x"0F";
  end function;

end package body;