aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/issue212/test.vhdl
blob: c322888f2c594213139b8c412d19157b8c6a458b (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
45
PACKAGE test_pkg IS

  TYPE test_record_t IS RECORD
    number : integer;
  END RECORD test_record_t;

  FUNCTION set_test_record_default
    RETURN test_record_t;

  FUNCTION set_test_record (
    CONSTANT C_TEST : test_record_t := set_test_record_default)
    RETURN test_record_t;

END PACKAGE test_pkg;

PACKAGE BODY test_pkg IS

  FUNCTION set_test_record_default
    RETURN test_record_t IS
    VARIABLE result : test_record_t;
  BEGIN
    result.number := 0;
    RETURN result;
  END set_test_record_default;

  FUNCTION set_test_record (
    CONSTANT C_TEST : test_record_t := set_test_record_default)
    RETURN test_record_t IS
  BEGIN
    RETURN C_TEST;
  END set_test_record;

END PACKAGE BODY test_pkg;

ENTITY test IS
END ENTITY test;

LIBRARY work;
USE work.test_pkg.set_test_record;

ARCHITECTURE rtl OF test IS

BEGIN

END ARCHITECTURE rtl;