diff options
Diffstat (limited to 'testsuite/gna/ticket59/bug.vhdl')
-rw-r--r-- | testsuite/gna/ticket59/bug.vhdl | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/testsuite/gna/ticket59/bug.vhdl b/testsuite/gna/ticket59/bug.vhdl new file mode 100644 index 0000000..78bbc5e --- /dev/null +++ b/testsuite/gna/ticket59/bug.vhdl @@ -0,0 +1,49 @@ +package pkg is + type rec0_t is record + field0 : boolean; + end record; + + type rec1_t is record + field1 : boolean; + end record; + + function fun(val : boolean) return rec0_t; + function fun(val : boolean) return rec1_t; + function fun(val : boolean) return boolean; + + procedure proc; +end package; + +package body pkg is + function fun(val : boolean) return rec0_t is + begin + return (field0 => val); + end function; + + function fun(val : boolean) return rec1_t is + begin + return (field1 => val); + end function; + + function fun(val : boolean) return boolean is + begin + return val; + end function; + + procedure proc is + begin + assert fun(true).field0; + assert fun(true).field1; + assert fun(true); + end procedure; + +end package body; + +entity ent is +end; + +architecture behav of ent is +begin + work.pkg.proc; +end behav; + |