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

architecture a of ent is
begin
  main : process is
    constant c : boolean := false;
    variable v : boolean;

    type enum is (a, b, short, \Extended\, \Weird\\Name\);
    variable e : enum;
  begin
    report to_string(c); -- Cause TYPES.INTERNAL_ERROR
    report to_string(false);  -- Cause TYPES.INTERNAL_ERROR
    report to_string(integer'(1)); -- Cause TYPES.INTERNAL_ERROR
    report to_string(v); -- Works
    report to_string(\Extended\);
    report to_string(\Weird\\Name\);

    assert to_string(CR) = (1 => CR) severity failure;
    assert to_string(integer'(1)) = "1" severity failure;
    assert to_string(integer'(-12)) = "-12" severity failure;
    assert to_string(FaLse) = "false" severity failure;

    assert to_string (\Extended\) = "Extended" severity failure;
    assert to_string(\Weird\\Name\) = "Weird\Name" severity failure;
    assert enum'image(\Weird\\Name\) = "\Weird\\Name\" severity failure;
    e := \Weird\\Name\;
    assert enum'image(e) = "\Weird\\Name\" severity failure;
    report to_string(e);
    assert to_string(e) = "Weird\Name" severity failure;
    wait;
  end process;
end architecture;