aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/issue1453/bug.vhdl
blob: 3be7969eb0fdfd2b2bf93c62d3e222b1a376ac8b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
library ieee;
use ieee.numeric_std.all;
package bug is
    subtype byte is unsigned (7 downto 0);
    subtype word is unsigned (15 downto 0);
    function high_byte(w: word) return byte;
end bug;
package body bug is
    function high_byte(w: word) return byte is
    begin
        return (7 downto 0 => w(15 downto 8));
    end;
end bug;