aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/issue397/e.vhdl
blob: c617150bba58e1319bebb784cf89bb073102a6a7 (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
entity bug is
end entity;

architecture a of bug is
begin
  main : process
    type rec_t is record
      field : natural;
    end record;

    impure function get_rec return rec_t is
    begin
      return (field => 10);
    end;

    -- Comment out this procedure to avoid the crash
    procedure get_rec(variable rec : out rec_t) is
    begin
      rec := get_rec;
    end;

  begin
    assert get_rec.field = 10 severity failure;
    wait;
  end process;
end;