aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/bug18359/testcase.vhdl
blob: 4302e942a019081c4f7458e1aec429a74d19e8e1 (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
entity testcase is
end entity testcase;

architecture non_conformity of testcase is
  function some_function return integer is
    variable my : integer := 0;
  begin
    my := my + 1;
    return my;
  end function some_function;
begin

  stuff: process
    variable last_value : integer;
  begin
    for i in 1 to 4 loop
      report "Count: " & integer'image(some_function)
        severity NOTE;
    end loop;
    last_value := some_function;
    assert last_value = 5
      report "Counter's last value is " & integer'image(last_value)
      &      " but expected 5"
      severity ERROR;
    wait;
  end process;

end architecture non_conformity;