blob: 55e3fc455c4802179eeb61a175f51f7c6dc42b59 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
entity bug02 is
end bug02;
architecture rtl of bug02 is
FUNCTION weird (bw : integer range 2 to 32)
RETURN INTEGER IS
BEGIN
RETURN -(2**(bw - 1));
END weird;
begin
process
constant c : integer := weird (10);
begin
report natural'image(c);
assert c = -512 severity failure;
wait;
end process;
end architecture;
|