aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/issue126/seg_fault.vhdl
blob: dab7c14af7451bccead8342a2daca933eafe94f3 (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
package pa is
 type t is range 0 to 3;
end package;

use work.pa.t;
package pb is
 function  f (a,b:t) return t      ;
 function "="(a,b:t) return boolean;
end package;

use work.pa."+";
-- This side note is not part of the bug report: with vhdl pre-2008 this use clause should be required (I think) and it is not
-- use work.pa."=";
package body pb is
 function  f (a,b:t) return t       is begin return a+b; end function;
 function "="(a,b:t) return boolean is begin return a=b; end function;
end package body;

use work.pa.all; -- fails with and without this use clause
use work.pb.f;
use work.pb."="; -- this causes the problem
entity e is begin
 assert f(1,2)=0 severity note;
end entity;
architecture a of e is begin end architecture;