aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/ticket59/bug.vhdl
blob: 78bbc5e6df6d158af2a70519aa34754f489b5133 (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
46
47
48
49
package pkg is
  type rec0_t is record
    field0 : boolean;
  end record;

  type rec1_t is record
    field1 : boolean;
  end record;

  function fun(val : boolean) return rec0_t;
  function fun(val : boolean) return rec1_t;
  function fun(val : boolean) return boolean;

  procedure proc;
end package;

package body pkg is
  function fun(val : boolean) return rec0_t is
  begin
    return (field0 => val);
  end function;

  function fun(val : boolean) return rec1_t is
  begin
    return (field1 => val);
  end function;

  function fun(val : boolean) return boolean is
  begin
    return val;
  end function;

  procedure proc is
  begin
    assert fun(true).field0;
    assert fun(true).field1;
    assert fun(true);
  end procedure;

end package body;

entity ent is
end;

architecture behav of ent is
begin
  work.pkg.proc;
end behav;