aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/issue646/repro3.vhdl
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/gna/issue646/repro3.vhdl')
-rw-r--r--testsuite/gna/issue646/repro3.vhdl25
1 files changed, 25 insertions, 0 deletions
diff --git a/testsuite/gna/issue646/repro3.vhdl b/testsuite/gna/issue646/repro3.vhdl
new file mode 100644
index 000000000..7d02c25f4
--- /dev/null
+++ b/testsuite/gna/issue646/repro3.vhdl
@@ -0,0 +1,25 @@
+entity repro3 is
+end entity;
+
+architecture tb of repro3 is
+
+ type tb_cfg_t is record
+ value : string;
+ end record tb_cfg_t;
+
+ function get_msg return string is
+ begin
+ return "goodbye";
+ end get_msg;
+
+ function init return tb_cfg_t is
+ begin
+ return (value => get_msg);
+ end init;
+
+ constant tb_cfg: tb_cfg_t := init;
+begin
+ assert tb_cfg.value > "a";
+end tb;
+
+