aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/issue2134/attribute_on_shared_variable.vhdl
blob: 7fe18cff2d3c1946ea79cd4dc0fcc0df184dc13e (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
library ieee; 
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;

package attribute_on_shared_variable is

    type protected_t is protected
        impure function some_function return natural;
    end protected;

end package;

package body attribute_on_shared_variable is

    type protected_t is protected body
        variable i : integer;
        impure function some_function return natural is
        begin
            return i;
        end function;
    end protected body;

    shared variable si : protected_t; 

    attribute some_value : integer;
    attribute some_value of si : variable is si.some_function;

end package body;